发送HTML电子邮件以意向 [英] Send HTML e-mail with Intent

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

问题描述

我要当一个用户决定分享我的应用程序发送的HTML电子邮件。我为了使用HTML有一个定制的称谓消息。

I want to send a HTML e-mail when an user decides to share my app. I'm using HTML in order to have a customised and appellative message.

第一种方法,我尝试使用Html.fromHtml创建我的HTML(内嵌样式)的字符串,但是当我收到邮件是纯文本文件,不需要定制。

First approach, I tried to create a String with my HTML (inline style) using Html.fromHtml but when I received the e-mail it was pure txt, no customization.

第二条本办法,送一个附加的HTML文件。这种方法的问题是,HTML是不显示直到用户打开连接

Second approach, send a HTML file attached. The problem with this approach is that the HTML is not showed until the user opens the attach.

什么是最好的解决方案,这可能吗? 谢谢!

What's the best solution, is it possible? Thanks!

推荐答案

您可以使用此方法实现你的任务 Html.fromHtml(字符串);

You can achieve your task using this method Html.fromHtml(String);

Html.fromHtml("<font color='#ff123456'>text</font>")

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

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