"$d_sysMaint""email programs/Thunderbird command line emails.txt www.BillHowell.ca 17Jan2020 initial remove empty lines at the start of each email attachement, and have the extension ".eml", not ".txt"! cannot have a comma "," in the body of the email sent! quotation marks are lost, and of course quotes will be problematic (need to put in co ****************** 17Jan2020 Better way to include the body of another email : +-----+ "message" : specify a plain text or an HTML file with UTF-8 encoding for the body of the mail (available in TB 52+). Piping is supported to some degree. On some systems you can specify it this way: message=/dev/stdin >> get ugly code - unlike saving email from Thunderbird save as html? >> looks like it might work (I had deleted empty lines at start) >> doesn't work as message : cmd := link 'thunderbird -compose "to=' Toers ',subject=' subject ',body=' body ',cc=' CCads ',cc=' CCins ',message=' message '" ' ; >> "message" : specify a plain text or an HTML file with UTF-8 encoding for the body of the mail (available in TB 52+). +-----+ "attachment" : specify the directory and the name of an attachment the value should be a file:// url, properly encoded with tb3+, you can alternatively use the absolute file name (unencoded) >> This works beautifully! I must use html character codes : see "$d_sysMaint""/html/html codes notes.txt" , , , Comma “ " " " Double quotes (or speech marks) ‘ ' ' Single quote   insert a space %0D%0A line break in a mailto +-----+ OK - it's basically working now. I have to remove empty lines at the start of each email attachement, and have the extension ".eml", not ".txt"! >> done Now I have a problem that the first email is sent, then the second is "locked-up" and not sent. >> check video production operators that had to work with this! ****************** 17Jan2020 Great reference! : List of command line arguments : http://kb.mozillazine.org/Command_line_arguments http://kb.mozillazine.org/Command_line_arguments_%28Thunderbird%29 Command line arguments - Thunderbird Compose new mail with command line You have to use the command line option "-compose" to launch Thunderbird and open a new compose window. The following arguments for this option are available: "to" : used to specify the email of the recipient "cc" : used to specify the email of the recipient of a copy of the mail "bcc" : used to specify the email of the recipient of a blind copy of the mail* "newsgroups" : one or more news groups to submit the message to* "subject" : subject of the mail "format" : compose the message in HTML ("format=1") or plain text ("format=2")* with TB 52+ instead of the numbers you can also write strings like "html" or "text" which are not case sensitive "from" : set the from email address here if you have multiple identities and don't want the default one (available in TB 52+) "preselectid" : an identifier for the "From" identity to choose from the menu (obsolete with TB 52+; see the "from" argument)* note that you cannot directly specify an e-mail address but need to find the identity key for example, "preselectid=id2" would select the identity #2 you can find the key by try-and-error or by searching for "useremail" in the Config Editor "body" : body of the mail "message" : specify a plain text or an HTML file with UTF-8 encoding for the body of the mail (available in TB 52+). Piping is supported to some degree. On some systems you can specify it this way: message=/dev/stdin "attachment" : specify the directory and the name of an attachment the value should be a file:// url, properly encoded with tb3+, you can alternatively use the absolute file name (unencoded) *(in Thunderbird 3.1.9 and earlier, these options must be preceded by at least one other option and cannot be at the start of the argument list due to bug 627999.) Watch out for the somewhat complex syntax of the "-compose" command-line option. The double-quotes enclose the full comma-separated list of arguments passed to "-compose", whereas single quotes are used to group items for the same argument. Example: thunderbird -compose "to='john@example.com,kathy@example.com',cc='britney@example.com',subject='dinner',body='How about dinner tonight?',attachment='C:\temp\info.doc,C:\temp\food.doc'" (use attachment="file:///C:/temp/food.doc" for Thunderbird 2.0) For mailto: urls the "in-reply-to" header is also supported "in-reply-to" : adds In-Reply-To with the provided reference, adds it to References enddoc