Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a bash script that will allow me to send a batch of emails out. I am using Cygwin, Windows XP and Thunderbird 3.1.3. I have the script generating an email just fine. The problem that I am having is that I have several email accounts set up in Thunderbird, and I wish to use a different account than the one that is selected by the command line. I only have one profile set up.

The command line that I arrive at is as follows:

thunderbird -compose "to=$strEmailAdd,subject=$SUBJ,attachment='file:///d:/docs/attach/file_to_attach.doc',body='$BODY'"

Is there a way to specify the account that the email is coming from or at the very least, specify a 'from' address? I have tried using "from" and "reply-to" as fields to no avail.

share|improve this question
Not on topic, but mixing $SUBJ and $strEmailAdd in the same code is ugly. – grawity Sep 17 '10 at 13:39
$SUBJ and $BODY are constants. $strEmailAdd is not. That is why I did it that way. – Buggabill Sep 17 '10 at 15:28

Don't use Thunderbird, it's not designed for batch usage. There are plenty SMTP clients such as msmtp or sendEmail.

(msmtp implements a sendmail interface, so it only accepts premade MIME messages)

share|improve this answer
Normally, I would agree with you and would use one of those options. But, I need to be able to (possibly) edit the messages after they are generated. – Buggabill Sep 17 '10 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.