SYNTAX FOR HTML COMPOSE
The below listed syntax can be pasted directly into a Windows command line window of a PC with thunderbird installed to the standard location of "c:\Program Files\Mozilla Thunderbird\thunderbird.exe" to generate an HTML email from command line.
Some commonly struck issues, when attempting to construct an HTML email from command are:
- DOUBLE QUOTES AS OPPOSED TO SINGLE QUOTES: Double quotes must be used as shown below.
- NEW LINES/MULITPLE LINES: To compose emails at command line that contain multiple lines of text, ensure Thunderbird is instructed to use HTML as opposed to plain text, by including the format="1" command as shown, then use HTML <BR> to force a line feed.
- COMMAS: Commas must be replaced with their HTML ASCII equivalent, being --> ,
THE SYNTAX:
"c:\Program Files\Mozilla Thunderbird\thunderbird.exe" -compose to="person@example.com",subject="Your Email Subject",format="1",body="<HTML><BODY>Hello,<BR><BR>This is a multi-line HTML email composed from command line.<BR>This is another line.<BR><BR>and another line.</BODY></HTML>"