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.

link|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
feedback

1 Answer

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)

link|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
feedback

Your Answer

 
or
required, but never shown

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