Email dialog HTML ignores some tags Titanium Moblie

﹥>﹥吖頭↗ 提交于 2019-12-11 17:32:12

问题


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();

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?

the question was asked also in Titanium Q&A


回答1:


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.

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



来源:https://stackoverflow.com/questions/8588529/email-dialog-html-ignores-some-tags-titanium-moblie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!