I'm using MFMailComposeViewController
to send a file. Everything works fine with files under 15mb. Anything over, and the file simply doesn't get attached to the MFMailComposeViewController
view. It's not that the email server isn't accepting, its that it never gets attached in the first place.
Does anyone have any ideas if there's a way to resolve that?
I know many email services can't handle attachments over 5 or 10mb, but other services allow you much larger file size.
MFMailComposeViewController *mail = [[[MFMailComposeViewController alloc] init] autorelease]; mail.mailComposeDelegate = self; NSString* path = [NSString stringWithFormat:@"%@/%@/%@", NSHomeDirectory(), @"Documents", fileName]; NSData *data = [NSData dataWithContentsOfMappedFile:path]; //also tried dataWithContentsOfFile with same results [mail addAttachmentData:data mimeType:@"audio/x-caf" fileName:[NSString stringWithFormat:@"%@.caf", label]]; [appDelegate.tabBarController presentModalViewController:mail animated:YES];