Send HTML email with Gmail 6.11.6 using intent
<p>I've been using intents to send HTML formatted emails using Gmail on Android from my app. It was working fine but now it does not show formatting even in Gmail compose display. Is there another bug in the Gmail app again or what??</p>
<p><strong>Note:</strong> I have gone through these questions already
<a href="https://stackoverflow.com/questions/13756200/send-html-email-with-gmail-4-2-1">bug in gmail 4.something</a>
and
<a href="https://stackoverflow.com/questions/13712454/did-android-gmail-4-2-1-break-html-intents">broken gmail intents</a></p>
<p>My code looks like this</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(HTML_TEXT);
String htmlContentInStringFormat = createHtmlforEmail(context, name, channelLink);
if (htmlContentInStringFormat != null) {
   intent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(htmlContentInStringFormat));
   }
intent.putExtra(Intent.EXTRA_SUBJECT, name);
    
</code></pre>
<p><strong>Note 2:</strong> It was working fine previously so there is nothing wrong with the HTML.</p>
<p>My HTML looks like this</p>
<pre><code>&lt;div align=&quot;center&quot;&gt;
&lt;font size=&quot;5&quot; color=&quot;#D0021B&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;CHARE&lt;/font&gt;
&lt;p&gt;&lt;font size=&quot;3&quot; color=&quot;black&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;Dear Receiver,&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size=&quot;3&quot; color=&quot;black&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;The sender of this email wants to invite you to this CHARE channel %1$s. Please click the subscribe button below to subscribe the channel.&lt;/font&gt; &lt;/p&gt; &lt;p&gt;&lt;a href=%2$s&gt;&lt;font size=&quot;5&quot; color=&quot;#5188de&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;Subscribe&lt;/font&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;font size=&quot;3&quot; color=&quot;black&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;More information is available under&lt;/font&gt;&lt;/br&gt;&lt;a href=&quot;www.chare.one&quot;&gt;&lt;font size=&quot;3&quot; color=&quot;#5188de&quot; face=&quot;Helvetica, Arial, sans-serif&quot;&gt;www.chare.one&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
</code></pre>
<p>I have also tried very simple version of HTML which is given below</p>
<pre><code>&quot;Hello, here is some &lt;b&gt;bold text&lt;/b&gt; some &lt;u&gt;underline text&lt;/u&gt; and &lt;a href=\&quot;http://www.google.com\&quot;&gt;a link&lt;/a&gt;.&quot;
</code></pre>
<p>But Gmail still does not set the formatting.
It will be great if someone points me to right direction.</p>
<p>Suggestions related to some alternatives will be welcomed.</p>