我正在使用此代码,但它没有发送带有视频的邮件,这是我的代码:
MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"My Subject"];
[controller setMessageBody:@"" isHTML:NO]; if (controller) [self presentModalViewController:controller animated:YES];
[controller release];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:titleString];
NSLog(@"datapath=%@",dataPath);
NSURL *url=[[NSURL alloc] initFileURLWithPath:dataPath];
NSLog(@"url..%@",url);
NSData *data=[[NSData alloc]initWithContentsOfURL:url ];
[controller addAttachmentData:data mimeType:@"video/quicktime" fileName:titleString];
请帮帮我