ThunderBird formatting command line

Discuss building things with or for the Mozilla Platform.
Locked
SofusGraae
Posts: 2
Joined: June 19th, 2010, 1:52 am

ThunderBird formatting command line

Post by SofusGraae »

Hey Everyone,

I am hoping someone can point me in the right direction as I am currently working on a python script which outputs information from a 3D application (Autodesk Maya) and passes it on to thunderbird via the terminal on linux.
Every thing works like a charm but I am unable to figure out how I can format the body of the email text - namely including line breaks.
I believe what I am looking for is a command line equivalent of html's <br /> but the documentation do not include any information on this - only how to compose and set receivers, subject line and body.

Any help or pointers in the right direction is most welcome,

I hope I have been clear enough about what I am looking for if not please let me know and I will provide more information.

Best,
Sofus
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: ThunderBird formatting command line

Post by Rod Whiteley »

It is encoded like a URL. Also, it depends on which editor Thunderbird will open, which in turn depends on the user's setting for the default account's default identity in Thunderbird, so that the information is not generally available to your script. In the plain text editor, simply include a newline character (%0A). In the HTML editor you can use either a newline character or a BR tag (%3Cbr%3E).
Rod
SofusGraae
Posts: 2
Joined: June 19th, 2010, 1:52 am

Re: ThunderBird formatting command line

Post by SofusGraae »

hey Ron,

First off thanks for the quick reply much appreciated - I will give it a go as soon as I get in to the office today and let you know how it worked out.

Best,
Sofus
tamhas
Posts: 124
Joined: April 23rd, 2007, 12:00 pm

Re: ThunderBird formatting command line

Post by tamhas »

I've got the same problem, only the source is Access. The target user will be using non-HTML mail, but I have tried using both %0A and %3Cbr%3E and in both cases I am just getting the literal characters in the body, all smushed together into one line. The call is

strInLine = strTbird & " -compose to='" & strEmailAddress & _
"',subject='" & strActivityName & _
"',body='" & strNotes & _
"'"
Call Shell(strInLine, vbNormalFocus)

and I have tried both single and double quotes around the body, but double quotes just gives me the first physical line or characters before the first %0A and single quote pays no attention to any line breaks in the file.
tamhas
Posts: 124
Joined: April 23rd, 2007, 12:00 pm

Re: ThunderBird formatting command line

Post by tamhas »

BTW, I notice that the single quotes don't show in the prior post, but in the actual code, there are single quotes within the double quotes to bracket each argument.
corlit
Posts: 2
Joined: September 11th, 2012, 6:58 pm

Re: ThunderBird formatting command line

Post by corlit »

Hi, I realize this is an old post, but I'd struck the same problem and manged to resolve formatting and multiple line issues per the following:

http://www.corlit.com/misc_help_page_compose_thunderbird_email_from_command_line.html

Hope this helps
User avatar
LoudNoise
New Member
Posts: 39900
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Re: ThunderBird formatting command line

Post by LoudNoise »

Locking due to age. If you have the problem and this solution does not fix please start a new thread.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."
Locked