I am trying to send an email with MFMailComposeViewController. I\'m able to send emails with images attached, but when I try to attach mp3 or mp4 files I get this message: <
NSString *mp3File = [NSTemporaryDirectory() stringByAppendingPathComponent: @"tmp.mp3"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:mp3File];
NSData *soundFile = [[NSData alloc] initWithContentsOfURL:fileURL];
[mailDialogController addAttachmentData:soundFile mimeType:@"audio/mpeg" fileName:@"tmp.mp3"];
works for me with mp3 files. when you say it fails with mp4, in what way?
if app is crashing after a few, you have a memory leak somewhere most likely.