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

后端 未结 5 1465
你的背包
你的背包 2020-12-09 05:31

I want my app using the MFMailComposeViewController to send an email such that the recipient can click on the embedded url to open the correspondin

5条回答
  •  臣服心动
    2020-12-09 05:47

    I have the same problem.

    My link is HTML, I can see 'blue' but if I click it, doesn't open safari mobile. Is allowed to me edit the text.

    In a class I have this:

    -(id) init{
        self = [super init];
        if (self) {
                if ([MFMailComposeViewController canSendMail]) {
                    self.mailComposeDelegate = self;
                    [self setSubject: @"Subject"];
                    [self setMessageBody: @"

    Body

    link example" isHTML: YES]; } else { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Mail Accounts" message:@"You don't have a Mail account configured, please configure to send email." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alert show]; } } return self; } -(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error{ [controller dismissModalViewControllerAnimated: YES]; }

    Here you can see the iPad Screen shot: iPad Screen shot

    If I send, and then I go to "Sent" Mailbox the link works, so I think the problem is the event which open the links.

    Thanks.

提交回复
热议问题