Hello,

I'm trying to send HTML email using the GMail package installed on the
T-Mobile G1.  What I'm finding is that regardless of the content-type
I specify, the message body is always translated into both text/plain
and text/html ; however, the html is escaped (e.g. "<" becomes "&lt;")
so it does not display as html in the receiving email client.

Here's how I'm setting up the Intent:

String[] addresses = {aAddress};

Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_EMAIL, addresses);
intent.putExtra(Intent.EXTRA_SUBJECT, aSubject);
intent.putExtra(Intent.EXTRA_TEXT, aBody);
intent.setType("text/html");
startActivity(newIntent);

The email I receive looks something like this:


MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_Part_494_24247511.1226466478922"

------=_Part_494_24247511.1226466478922
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



<html><p>Here's a property you might want to look at:<ul><li>149
Ashbury,
San Francisco, CA, 94117<br/>View in Puluwai | <a href="
http://www.agencylogic.com/googlebase/149Ashbury-com
">Browser</a></li></ul></html>

------=_Part_494_24247511.1226466478922
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<p>&lt;html&gt;&lt;p&gt;Here&#39;s a property you might want to look
at:&lt;ul&gt;&lt;li&gt;149 Ashbury, San Francisco, CA, 94117&lt;br/
&gt;View in Puluwai | &lt;a href=&quot;<a href="http://
www.agencylogic.com/googlebase/149Ashbury-com">http://www.agencylogic.com/googlebase/149Ashbury-com</a>&quot;&gt;Browser&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/html&gt;</p>


------=_Part_494_24247511.1226466478922--
As you can see, the html is modified by gmail.  The "text/plain"
version is basically correct except for its mime type.

I've tried setting various other content types, e.g.:

"text/xhtml"
"message/rfc822"
"message/rfc2822"
"text/plain"
"multipart/mixed"

No luck so far-- anyone have any ideas?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to