New line and returns ignored in setMessageBody
- by Magic Bullet Dave
Am I doing something dumb? I can pre-fill and email ok but the "\r\n" is ignored in the emailBody:
- (void) sendEventInEmail
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSString *emailSubject = [eventDictionary objectForKey:EVENT_NAME_KEY];
[picker setSubject:emailSubject];
// Fill out the email body text
NSString *iTunesLink = @"http://itunes.apple.com/gb/app/whats-on-reading/id347859140?mt=8"; // Link to iTune App link
NSString *content = [eventDictionary objectForKey:@"Description"];
NSString *emailBody = [NSString stringWithFormat:@"%@\r\nSent using <a href = '%@'>What's On Reading</a> for the iPhone.", content, iTunesLink];
[picker setMessageBody:emailBody isHTML:YES];
picker.navigationBar.barStyle = UIBarStyleBlack;
[self presentModalViewController:picker animated:YES];
[picker release];
}
Regards
Dave