【问题标题】:Android: prefilled email with htmlAndroid:使用 html 预填充电子邮件
【发布时间】:2012-11-22 08:06:06
【问题描述】:

我有这段代码可以预先填写一封电子邮件并抛出一个意图:

Intent email_intent = new Intent(Intent.ACTION_SEND_MULTIPLE);   
email_intent.putExtra(Intent.EXTRA_SUBJECT,
"iTempco"+getString(R.string.superficie_scambio));  
email_intent.putExtra(Intent.EXTRA_TEXT,{{here_the_html_code}});
email_intent.setType("text/html");  
startActivity(email_intent);

您在哪里看到 {{here_the_html_code}} 我有一个带有 html 代码的字符串(完美运行)。 问题是,当活动被抛出时,我在客户端的文本区域中看到了 html 代码(源代码),而不是“转换后的”

我该怎么办?

谢谢。

【问题讨论】:

  • 您无法真正告诉外部电子邮件程序要做什么,所以我认为您不能期望大多数电子邮件程序实际上会通过意图数据将 html 作为输入...

标签: android html email utf-8


【解决方案1】:

我有同样的问题,但无法解决。 大多数默认电子邮件客户端不会处理 html 标签。 我发现最好的解决方法是将 html 作为附件发送。

检查我的问题: Is it possible to send html with the mail intent?

【讨论】:

  • 好的,如果您在不使用自定义电子邮件客户端的情况下找到解决方案,请告诉我。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-11-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-09
  • 2023-03-07
  • 2017-06-11
相关资源
最近更新 更多