Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kmrityu

macrumors newbie
Original poster
Jan 22, 2014
1
0
SBElementArray *mailAttachments = [selectedMessage mailAttachments];

for(MailMailAttachment *mailmailAttachment in mailAttachments) {

NSLog(@"Name--->%@",[mailmailAttachment name]);
NSLog(@"attchment id--->%@",[mailmailAttachment id]);
NSLog(@"mailmailAttachment--->%@",mailmailAttachment);

NSString *fileNameWithBlank1 = [[mailmailAttachment name] stringByReplacingOccurrencesOfString:mad:" " withString:mad:"%20"];

NSURL* targetfileUrl = [NSURL URLWithString:[NSString stringWithFormat:mad:"file://localhost/Users/myname/Desktop/Build/%@",fileNameWithBlank1]];

NSLog(@"targetfileUrl--->%@",targetfileUrl);

[mailmailAttachment delete]; // delete attachments
[mailmailAttachment saveIn:targetfileUrl as:MailSaveableFileFormatNativeFormat];

}


hi Experts, I have code which is not working for delete message, It throwing some error code OSStatus error -10000 but the message "saveIn" is working fine ,Why it is so.AppleEvent is applied on Same objectType then why their is difference. Please help me to sort out this issue. :confused:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.