使用MFMailComposeViewController发送HTML格式的电子邮件 [英] send an HTML formatted email using MFMailComposeViewController
本文介绍了使用MFMailComposeViewController发送HTML格式的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用HTML内容格式化邮件并使用MFMailComposeViewController发送邮件。但是在接收端,邮件未达到HTML格式。仅纯文本可见。如何解决此问题。如何提前感谢。
I am formatting a mail with HTML content and sending it using MFMailComposeViewController.But on the receiver side mail is not reaching in HTML format.Only Plain text is visible.How could I resolve this issue.Thanks in advance.
推荐答案
确保使用以下行设置邮件正文:
Be sure to set the message body using the following lines:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSString *emailBody = @"<p><b>Hello World</b></p>";
[picker setMessageBody:emailBody isHTML:YES];
这篇关于使用MFMailComposeViewController发送HTML格式的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文