发送HTML电子邮件使用Gmail 4.2.1 [英] Send HTML email with Gmail 4.2.1

查看:201
本文介绍了发送HTML电子邮件使用Gmail 4.2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看来,Gmail的4.2.1可能有损坏的HTML格式的电子邮件。下面code到4.2.1完美工作之前。这是从Gmail发送的电子邮件有所需的嵌入式链接,加粗和下划线的字词。不幸的是,更新到4.2.1后,好像所有的HTML格式已经被剥离出来的被发送的电子邮件显示。我希望有可能是一种解决方法,也许有人已经发现了什么?

It seems that Gmail 4.2.1 may have broken HTML-formatted emails. The following code worked perfectly prior to 4.2.1. The email that was sent from Gmail had the desired embedded links, bolded and underlined words. Unfortunately, after updating to 4.2.1, the email that gets sent appears as if all the HTML formatting has been stripped out. I am hoping there may be a workaround for this that maybe someone has found?

final Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
String[] toArr = new String[] { "someone@somewhere.com" };
intent.putExtra(Intent.EXTRA_EMAIL, toArr);
intent.putExtra(Intent.EXTRA_SUBJECT, "This is a subject");
intent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml("Hello, here is some <b>bold text</b> some <u>underline text</u> and <a href=\"http://www.google.com\">a link</a>."));

有趣的事(或许不是?)是,这个电子邮件的撰写preVIEW显示所有的粗体,下划线和链接文字作为一个希望它出现。但是,当它被发送,收件人获取电子邮件,所有的这些东西剥离出去。

The interesting thing (or maybe not?) is that the compose preview of this email message shows all of the bolded, underlined and linked text as one would expect it to appear. But when it gets sent, the recipient gets the email with all of that stuff stripped out.

是的,我知道这个其他问题关于本已关闭。我想,也许这是封闭的prematurely,我希望,额外的细节在这里可能有必要再看一看。

And yes, I am aware of this other question about this that was closed. I think that maybe it was closed prematurely and am hoping that the additional detail here may warrant another look.

更多信息:在进一步的研究中,这个问题是不是仅仅通过意图发送HTML电子邮件的方式做大。如果一个人创建一个使用Gmail网络应用程序,有一定的格式发送电子邮件草稿(粗体,下划线,超链接等),然后在您的Gmail Android应用(V4.2.1)打开电子邮件草稿将出现的所有格式的有被保留。但是,如果你再使用您的Gmail Android应用程序发送的电子邮件草稿,所有格式将被剥离出去的邮件发送之前。

MORE INFORMATION: Upon further research, this problem is way bigger than just sending HTML email via intents. If one creates a draft email using the GMail web app that has some formatting (bold, underline, hyperlinks, etc.), then open that draft email on your GMail Android app (v4.2.1) it will appear that all of your formatting has been kept. However, if you then send that draft email using your GMail Android app, all of your formatting will be stripped out before the email is sent.

推荐答案

这是几乎可以肯定在GMail中4.2.1的错误。

This was almost certainly a bug in GMail 4.2.1.

截至2013年3月19日的,4.3的GMail是出现以修复该错误释放。

As of March 19, 2013, GMail 4.3 was released which appears to fix the bug.

这篇关于发送HTML电子邮件使用Gmail 4.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆