I've spent the past two days just trying to enable the sending of email from within my app. Hoping one of the smart folks on here can help me out. presentModalViewController doesn't work for me (just crashes the app with no explanation as to why), so I'm forced to add the view of MFMailComposeViewController. Here's my attempt:
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"test subject"];
[controller setMessageBody:@"this is the message body" isHTML:NO];
// [self presentModalViewController:controller animated:YES]; //this crashes the app
//so I try this instead:
controller.view.frame = CGRectMake(0,0,480,320);
[self.view addSubview:controller.view];
[controller release];
What gets added to the screen is the subject bar only, with cancel and send buttons. None of the text fields (To:, Cc:, Subject, body) are displayed. Why aren't they a part of MFMailComposeViewController's view, and how can I display them?