Skip to main content
Participant
December 11, 2006
Question

how to add HTML tags to 'mailto' body

  • December 11, 2006
  • 1 reply
  • 1429 views
i'm trying to figure out how to add font color and bold to an email body.

i have the code working properly to build the email and drop the text in the correct locations. however, when i try to add the html tags to the process, it doesn't work.

when i use the escape command to URLencode the input, it goes through and you can read the html tags in the email. if i don't escape the text/tags, the mailto command fails completely.

dual 2.5 g5, 10.4.8, 3gig ram, plenty storage
flash 8pro. ripping flash8 swf, actionscripting 2.0

here's my current code:
emailto = escape("someone1@something.com,someone2@something.com");
emailsub = escape("REQUEST - order");
tempemailbody = "<B><FONT COLOR=\"#2B6EB5\">" + header + "</FONT></B>other text = " + somethingelse + "<br>";
emailbody = escape(tempemailbody);
emailvar = "mailto:" + emailto + "?subject=" + emailsub + "&body=" + emailbody;
getURL(emailvar, "_blank");

please advise.
thanks in advance
jason

ps. i tried adding this post twice and it didn't appear in the topic list. sorry if the previous ones eventually go thru
This topic has been closed for replies.

1 reply

Inspiring
December 11, 2006
You can't send HTML email right from Flash. You will need to use a
server-side script that adds the necessary headers into the email.

--
Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/