MFMailComposeViewController:如何将可点击的URL链接嵌入到电子邮件正文中 [英] MFMailComposeViewController : how do I embed a clickable URL link into the email message body

查看:118
本文介绍了MFMailComposeViewController:如何将可点击的URL链接嵌入到电子邮件正文中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的应用程序使用 MFMailComposeViewController 发送电子邮件,以便收件人可以点击嵌入的 url 打开相应的网站。
MFMailComposeViewController 似乎不支持此显式。任何想法?

I want my app using the MFMailComposeViewController to send an email such that the recipient can click on the embedded url to open the corresponding web site. MFMailComposeViewController does not appear to support this explicitly. Any ideas?

推荐答案

:)是的,你可以这样做:

:) Yes, you can do this:

MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
composer.mailComposeDelegate = self;
[composer setSubject:subject];
[composer setMessageBody:message isHTML:YES];                    

其中消息只是一个带有HTML内容的NSString。在里面你可以添加所有你想要的HTML。

where message is just an NSString with HTML content. Inside you can add all the HTML you want.

这篇关于MFMailComposeViewController:如何将可点击的URL链接嵌入到电子邮件正文中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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