Attachment name from command line

User Help for Mozilla Thunderbird
Post Reply
Ronald.1302
Posts: 1
Joined: August 15th, 2017, 4:22 am

Attachment name from command line

Post by Ronald.1302 »

Hey,

I am trying to make a batch script to automatically sent e-mails from Thunderbird with a pdf attachment. Basically it works, however, the filename which is shown in the received email shows the full path to the file. Is there a way to just show the filename without the path? This is the code I am using:

Code: Select all

thunderbird.exe -compose "to=me@mail.com,subject='Automated',body='bla bla bla',attachment='http://localhost/file.pdf'"
This is how it looks like in Thunderbird:
Image
http://imgur.com/a/QZaOt

I hope anyone can help me.
Ronald
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Attachment name from command line

Post by tanstaafl »

http://kb.mozillazine.org/Command_line_ ... hunderbird

Try using a two line batch file where the first line sets the current directory to where the attachment is stored so that you can use just the filename, rather than the full path, for the attachment.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Attachment name from command line

Post by tanstaafl »

If you use a IMAP account consider using one of the SMTP utilities in http://kb.mozillazine.org/Mail_Utilities#SMTP_utilities to send the message instead. You'd be able to access your copy of the saved message the next time you run Thunderbird if you use a SMTP server such as Gmail's that automatically saves a copy of the sent message in the senders account.
Post Reply