I’ve included messageUI framework in my app for sending mail.It contains five UITextField where the values entered by user should be displayed in mail body. Here is my code
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:[NSString stringWithFormat:@"Appointment From Mr/Mrs. %@",text1.text]];
NSArray *toRecipients = [NSArray arrayWithObjects:@"info@xxx.com", nil];
[mailer setToRecipients:toRecipients];
NSString *emailBody =[NSString stringWithFormat:@"Name :%@\nDate: %@\nPreferred Time Slot: %@\nE-Mail:%@\nSpecific Requests:",text1.text,text2.text,text3.text,text4.text,text5.text];
[mailer setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:mailer animated:YES];
[mailer release];
}
The issue i’m facing is that all the four text field values are displayed only the fifth text field values are not displayed..Any idea?…am i missing anything?…
Edit the following line of code
you will get your requirements…Dont forget to use resignFirstresponder to hide keyboard after u entered text…