command line for "send to mail recipient" with att

User Help for Mozilla Thunderbird
Post Reply
Kathy G
Posts: 25
Joined: July 28th, 2004, 11:17 pm

command line for "send to mail recipient" with att

Post by Kathy G »

Creating a shortcut to use when right clicking on a file that I want to e-mail someone as an attachment. Currently when I do that and select "send to" "e-mail recipient" (from Windows Explorer) I get a new message with the desired file attached in my default mail program (T-bird) but it has a bunch of unwanted text in the message pane. I created a shortcut according to these instructions I found but need to know the command-line switch for attaching the file.

"from Windows Explorer, you can create a new shortcut to launch an Outlook message with your file attached. In the \documents and settings\%userprofile%\sendto folder, create a new shortcut that points to the copy of Outlook installed on your system and add the /a %1 command-line switch, which tells Outlook to create a new message and attach the file you choose. "

Currently my shortcut is
'C:\program files\Mozilla Thunderbird\thunderbird.exe" /a %1

But I think that the /a %1 part is a command-line switch for outlook express, so I need to know what to type to make T-bird attach the file and begin a new message. Using this shortcut as is, I get taken to the T-bird main program, but no new message is started for me, and of course no attachment either.

I've searched the forum for command line script and can't find what I need. This shortcut is in my documents and settings "send to" folder. I think I'm close but need extra help. Thanks.
User avatar
Kromey
Posts: 253
Joined: July 29th, 2004, 5:20 pm
Location: BFE, Alaska
Contact:

Post by Kromey »

This will do what you need:

"C:\program files\Mozilla Thunderbird\thunderbird.exe" -compose attachment=%1

This link will help you with any further command-line headaches: http://www.mozilla.org/docs/command-line-args.html

I've done similar at work - we wanted to be able to right-click and send a file's path (from a networked drive); my script looks very similar:
"C:\program files\Mozilla Thunderbird\thunderbird.exe" -compose body=%1
Commander Kromey,
Obfuscating Digeratus Demigod
Kathy G
Posts: 25
Joined: July 28th, 2004, 11:17 pm

Post by Kathy G »

Thank you Kromey, I think I got a little further - but I get a message "an error occurred while creating a message compose window, please try again." (of course trying again doesn't help). If T-bird is already running when I try the right click "send to" it just takes me to the program but doesn't start a message. If T-bird is not running when I do the right click, it gives me this message and doesn't start T-bird. I had been to your link for command line headache relief before I posted my question, but I couldn't find what I was looking for there. The only spaces in my shortcut is after the exe" and before the -compose and after the -compose and before the attachment. Otherwise I think I typed exactly what you showed. Does this shortcut work for you (the compose attachment shortcut)?
User avatar
Kromey
Posts: 253
Joined: July 29th, 2004, 5:20 pm
Location: BFE, Alaska
Contact:

Post by Kromey »

Actually, shortly after posting this, I tried to use my hand-dandy file path link shortcut doohickey (that's a technical term!), and I've now also tried yours as well.

It seems that command-line behavior has changed in Tbird 1.5. I'm not getting an error message as you are, but neither is Thunderbird accepting the additional arguments to the compose window. Very odd, especially since it worked before (i.e. with Tbird 1.0.7). I'm going to dig around and see if I can't find some updated command-line arguments. In the meantime, try stripping off the last argument so that your shortcut is just opening the compose window, see if that works for you.

i.e.: "C:\program files\Mozilla Thunderbird\thunderbird.exe" -compose
Commander Kromey,
Obfuscating Digeratus Demigod
Kathy G
Posts: 25
Joined: July 28th, 2004, 11:17 pm

Post by Kathy G »

Actually the help-about menu shows that I am using 1.0.7, but that might be erroneous, because when I set up this new computer I downloaded the latest version of T-bird, and then I took my T-bird folder from the application data from the old computer and put it on the new one. I don't know how much stuff that file affects, but it got me back all my old e-mail, address book, and settings. I experimented with -compose attachment=&1 inserting spaces in different places, and I've googled myself to death looking for information on this - I hope you find the answer, because I sure can't. Best I can do is get T-bird to open up with a new message pane, but I can't get it to attach the file I right clicked on. For me, the old way of just deleting that annoying canned text is quicker than manually attaching the file. Right click, send to e-mail recipient gets you a new message pane with the file attached, but it prints this annoying blurb in the message area. Thanks for trying to help me - hope you fine something.
Post Reply