tags:

views:

42

answers:

0

I've configured a simple MFMailComposeViewController below. If I populate the setToRecipients, everything works fine, the email is sent. If I do not populate the setToRecipients, the mail composer window pops up but all fields remain non-editable.

I thought the MFMailComposeViewController would allow the user to edit the email before sending? Is this possible using the standard controls?

- (IBAction) sendEmail
{
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;

    [picker setSubject:[NSString stringWithFormat:@"Receipt Email - %@",[self.labelDate text]]];

    NSString *emailBody = @"This is the message body";

    [picker setMessageBody:emailBody isHTML:NO];

    [self presentModalViewController:picker animated:YES];
    [picker release];   
}