【发布时间】:2012-01-27 13:17:48
【问题描述】:
我正在使用以下代码发送一封电子邮件,其中包含 NSData 对象(变量名:data)的内容:
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
[controller setSubject:@"Subject"];
[controller addAttachmentData:data mimeType:@"application/pdf" fileName:@"Attachment"];
[controller setMessageBody:@"Please find attached the connections for..." isHTML:NO];
controller.mailComposeDelegate = self;
[self presentModalViewController:controller animated:YES];
它将生成为 pdf 的 UIView 添加为附件并发送电子邮件。一切都很好,除了一个问题:
当收到电子邮件时,连同附加的 pdf,还有另一个附加的 .txt 文件,其内容是:“从我的 iPad 发送”。如果我不附加 pdf,则“从我的 iPad 发送”消息会出现在电子邮件正文中,而不是附加文件中。
有人知道如何解决这个问题吗?我不希望在消息中附加文本文件。
问候,
佩塔
【问题讨论】:
-
您好,是否有此问题的更新或向 Apple 报告的任何错误,我可以参考?
标签: ios email pdf uiview attachment