[英]Not able to view the data in a attachment in mail when sending the attachments from mfmailcomposer
In MFMailComposer
I'm attaching an attachment. 在MFMailComposer
我附加了附件。 I send that attachment to another mail address. 我将该附件发送到另一个邮件地址。
In the destination mail that attachment are displayed with a download option and not with a view option.Actually that attachment is coming from a link. 在目标邮件中,附件显示为带有下载选项,而不显示为查看选项。实际上,附件来自链接。 I don't know that attachment is pdf
or word
documents or any other. 我不知道附件是pdf
或word
文档或其他文件。 I need help, what to do? 我需要帮助,该怎么办?
I'm using this code: 我正在使用此代码:
NSURL *url = [[NSURL alloc] initWithString:self.fileString];
NSData *attachments = [NSData dataWithContentsOfURL:url];
[mailView addAttachmentData:attachments mimeType:@"application/pdf" fileName:self.useridString];
模仿模仿可能会帮助您。
[mailView addAttachmentData:attachments mimeType:@"text/pdf" fileName:self.useridString];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.