如何在邮件作曲家附上两张图片 [英] how can attach two images in mail composer
本文介绍了如何在邮件作曲家附上两张图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您可以创建一个html页面代码并插入该图像作为标签,并将整个html作为字符串传递给MFMailComposer for Body.It将看起来很酷。
你需要写这行
MFMailComposeViewController * controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
if([recipentArray count]> 0)
{
[controller setToRecipients:self.recipentArray];
}
[controller setSubject:self.emailSubject];
[controller setMessageBody:self.messageBody isHTML:YES]; // isHTML - > YES / NO取决于消息体
[object presentModalViewController:controller animated:YES];
RELEASE_SAFELY(控制器);
一旦您实现了 MFMailComposer ,您需要设置 bool 如果您正在使用html页面。让我知道,如果你有任何疑问。
I am making an iPhone project for inserting two images in mail. The images are selected from the photo library and they're stored in two separate image views. When I attach the images in email, it doesn't attach it correctly.
解决方案
You can create a html page code and insert that image as tag and pass the whole html as string in the MFMailComposer for Body.It will look cool. you need write this line
MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
if ([recipentArray count]>0)
{
[controller setToRecipients:self.recipentArray];
}
[controller setSubject:self.emailSubject];
[controller setMessageBody:self.messageBody isHTML:YES]; // isHTML -> YES/NO depending the message body
[object presentModalViewController:controller animated:YES];
RELEASE_SAFELY(controller);
Once you will implement the MFMailComposer you need to set bool if you are using html page in body.Let me know if you have any doubt.
这篇关于如何在邮件作曲家附上两张图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文