开发者

Is it possible to send HTML Email through Flash using navigateToURL()?

I am trying to send email within an Adobe AIR app using AS3's navigateToURL() function. I have successfully sent over plain text, but was wondering if there is a way to set the content-type to text/html because right now it sends the HTML as brackets.

Example code:

navigateToURL(new URLRequest("mailto:me@domaincom"+"?"+"subject=Egad, an email!"+"&"+"body="+"I'm a little <b>teapot</b> short and stout,"+"%0A"+"Here is my <i>handle</i> and here is my spout..."));

It will currently output this:

I'm a little <b>teapot</b> short and stout,

Here is my <i>handle</i> and here i开发者_运维技巧s my spout...

I'm hoping to get this:

I'm a little teapot short and stout,

Here is my handle and here is my spout...

Thanks. :)


URLRequest has the property contentType, you tried setting it to "text/html"?


Setting the contentType didn't work for me :(

You can try the SMTPMailer from ByteArray.org: http://www.bytearray.org/?p=27

That sends attachments as well as HTML emails. You'll still need your own STMP account to send through though, but still 1 step easier than making a PHP file that sends the mail for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜