电子邮件对话框HTML忽略一些标签钛手机类 [英] Email dialog HTML ignores some tags Titanium Moblie

查看:206
本文介绍了电子邮件对话框HTML忽略一些标签钛手机类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在建设一个具有电子邮件发送功能的应用程序。我想发送一封电子邮件相关信息,并包括一个链接到正在发送的原职。原帖创建为HTML code段,所以我要发送电子邮件作为HTML。我创建了电子邮件对话是这样的:

I'm currently building an app that has Email sending capabilities. I'm trying to send an Email with the relevant information and includes a link to the original post that is being sent. the original post is created as an HTML code segment, so I have to send the Email as an HTML. i create the Email dialog like this:

var mail = Ti.UI.createEmailDialog({
    subject:'FW:'+post.desc,
    html:true,
    messageBody: '<br><br><a href="http://www.XXXXXXXX.com/index.php?tid='+post.id+'" target="_blank">view original post</a><br><br><b style="font-size:1.5em;font-family:Arial">'+post.desc+'</b><br><br><i>'+metaData.text.toString().replace(/\n/g,'<br>')+' </i><br><br>'+post.htmlData
});
Ti.API.debug(mail.messageBody)
mail.open();

当我跑我的设备上的应用程序,我得到了通过邮件,或通过Gmail的发送的选项。当通过邮件时,所有的链接选项卡发送,并忽略条纹所以电子邮件没有包括他们。然而,由于假设的Gmail的选项留下的一切。
什么想法?

when I ran the app on my device, I got the option of sending via "mail" or via "Gmail". when sent via "mail", all the link tabs and and were ignored and striped so the Email didn't include them. however, the "Gmail" option left everything as suppose to. any thoughts?

这个问题也问钛Q&安培; A

the question was asked also in Titanium Q&A

推荐答案

显然,Android的默认电子邮件客户端不具有HTML渲染器和忽视它,而Android版Gmail客户端将无法解析某些标记喜欢。
在我看来,像答案将使用临时文件和附件。
如果有人想出了一个更好的答案,我会很高兴的。

Apparently, the default Email client for Android doesn't have a HTML renderer and disregards it, and the Gmail Android client won't parse certain tags like . it seems to me like the answer will be using temporary files and attachments. if anybody comes up with a better answer I'll be very happy.

快乐耶诞|光明节| festivus对我们其余的人

happy X-mas | Hanukah | festivus for the rest of us

这篇关于电子邮件对话框HTML忽略一些标签钛手机类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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