Email body not displayed after sending from iPhone via code
I have couple of iPhone apps that sends an email via code. I've noticed quite a number of emails coming in from customers where everything is populated e开发者_如何学运维xcept for the body message (i always see their signature though).
I sent a test message, using the same app from my iPhone device, and i get the message (a simple "this is a test" message).
Wondering if there are any coding that needs to occur to handle different version of iOS, or perhaps different iPhone device hardwares?
Anybody noticed this before?
I would consider the possibility that the users are accidentally pressing send on a blank email. Perhaps to eliminate this as a possibility, guard against blank messages in code, then if it still happens you'll know it's a real issue.
set all delegates properly and use this
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
NSString *sub= [NSString stringWithFormat:@"The Black Sheep App: %@ Specials",[[BarSplArr objectAtIndex:0]objectForKey:@"barname"]];
NSString *message=[NSString stringWithFormat:@"Check out these specials for %@ on %@, %@ \n\n %@",[[BarSplArr objectAtIndex:0]objectForKey:@"barname"],day,date,[[BarSplArr objectAtIndex:0]objectForKey:@"drinkspecials"] ];
[controller setSubject:sub];
[controller setMessageBody:message isHTML:NO];
[self presentModalViewController:controller animated:YES];
[controller release];
精彩评论