0
我想以編程方式在iOS中的單個郵件中發送多個附件文件。我已嘗試以下內容:如何在iOS中的單個郵件中附加多個文件
// I give the file from array
NSString *str_mail = [readingEmfReading objectAtIndex:0];
// here I can encode the file
NSData *myData = [str_mail dataUsingEncoding:NSUTF8StringEncoding]
//here I can attach the file with extance of .csv
[controller addAttachmentData:myData mimeType:@".cvs" fileName:retriveEmail]
//here I can set the body for mail
[controller setMessageBody:@"file" isHTML:NO];
//here code for sent mail
if (controller) [self presentViewController:controller animated:YES completion:nil];
通過使用此代碼,我只能發送一個附件。然而,我想發送多個文件。我怎樣才能做到這一點?
調用方法'-addAttachmentData:mime類型:文件名:'任何時間你想添加一個附件,它是一種_add_不是一種方法(見前綴)......差異是顯而易見的,但如果你不確定,文檔也可以幫助你。 – holex 2013-05-09 11:55:04
下面是另一個堆棧流量鏈接http://stackoverflow.com/questions/5107926/how-do-i-attach-multiple-images-to-an-email-on-the-iphone這可能會幫助你 – Impossible 2013-05-09 11:27:34