Can I specify a specific account or "From" address in a command line for Thunderbird?

2

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.

Buggabill

Posted 2010-09-16T19:27:54.717

Reputation: 426

Not on topic, but mixing $SUBJ and $strEmailAdd in the same code is ugly. – user1686 – 2010-09-17T13:39:31.680

$SUBJ and $BODY are constants. $strEmailAdd is not. That is why I did it that way. – Buggabill – 2010-09-17T15:28:17.877

Answers

1

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)

user1686

Posted 2010-09-16T19:27:54.717

Reputation: 283 655

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 – 2010-09-17T12:12:52.560