0

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:@"[email protected]"]];
    [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?

1 Answer 1

0

Test it on a real device with mail account set.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.