Search code examples
iphoneobjective-ccocoa-touchmfmailcomposeviewcontroller

MFMailComposeViewController : how do I embed a clickable URL link into the email message body


I want my app using the MFMailComposeViewController to send an email such that the recipient can click on the embedded url to open the corresponding web site. MFMailComposeViewController does not appear to support this explicitly. Any ideas?


Solution

  • :) Yes, you can do this:

    MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
    composer.mailComposeDelegate = self;
    [composer setSubject:subject];
    [composer setMessageBody:message isHTML:YES];                    
    

    where message is just an NSString with HTML content. Inside you can add all the HTML you want.