I am trying to use the MFMailComposeViewController, I have set all the fields I want to be set as follows :
MFMailComposeViewController *message = [[MFMailComposeViewController alloc] init];
[message setMessageBody:@"My message here" isHTML:NO];
[message setToRecipients:[NSArray arrayWithObject:@"my@domain.com"]];
[message setSubject:@"Request Info"];
message.mailComposeDelegate = self;
// Present mail view controller on screen
UINavigationController *navController = (UINavigationController *)[[[[UIApplication sharedApplication] delegate] window] rootViewController];
[navController presentViewController:message animated:YES completion:NULL];
However when the mail compose window comes up the only field which is set is the Subject and nothing else, the body, the to field are all empty. What am I missing?
在具有邮件帐户集的真实设备上对其进行测试。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.