MFMailComposerを使用して、暗号化されたデータを含むテキストファイルを送信しようとしています。問題は、メールが受信トレイに届いたときに添付ファイルが表示されないことです。代わりに、「<br/><br/>
」の行が常に存在します。mimeタイプと関係があり、受信者のメールサーバーがデータの読み取り方法を知らないと思いますが、解決策がわかりません。
誰かが以前にこれに遭遇し、解決策を持っていますか?
if([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
mailController.mailComposeDelegate =self;
[mailController setSubject:@"Records"];
[mailController setMessageBody:@"" isHTML:YES];
[mailController addAttachmentData:dataToBeEncrypted mimeType:@"text/plain" fileName:@"Records.txt"];
[self presentModalViewController:mailController animated:YES];
[mailController release];
} else {
//Pop up a notification
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Could not send email. Verify Internet conneciton and try again." delegate:nil cancelButtonTitle:@"Done" otherButtonTitles:nil];
[alert show];
[alert release];
}
あなたが与えることができるどんな助けにも感謝します!