从iPhone应用程序发送包含img标签的电子邮件

从iPhone应用程序发送包含img标签的电子邮件,iphone,Iphone,我正在尝试将用户从本机应用发送到邮件应用。我想在邮件正文中嵌入一个标记。我知道这是可能的,因为“LOL Cats”应用程序可以做到这一点。我一直在尝试,但没有成功: NSString *url1 = [NSString stringWithFormat:@"mailto:email@email.com?subject=Check%20Out%20This%20Faux%20Screen&body=<img%20src=\"http://www.sample.com/Faux

我正在尝试将用户从本机应用发送到邮件应用。我想在邮件正文中嵌入一个标记。我知道这是可能的,因为“LOL Cats”应用程序可以做到这一点。我一直在尝试,但没有成功:

    NSString *url1 = [NSString stringWithFormat:@"mailto:email@email.com?subject=Check%20Out%20This%20Faux%20Screen&body=<img%20src=\"http://www.sample.com/FauxFoneServer/screenShot/getScreenByID?cur=%@\"/>The%20awesome%20person%20who%20sent%20you%20this%20email%20thinks%20you%20should%20visit%20http://www.fauxscreen.com"
                         ,[ScreenShotsAppDelegate sharedDelegate].viewController.curImage.imageID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url1]];
NSString*url1=[NSString stringWithFormat:@”邮件收件人:email@email.com?主题=签出%20此%20假%20屏幕和身体=真棒%20人%20谁%20发送%20你%20此%20电子邮件%20认为%20你%20应该%20访问%20http://www.fauxscreen.com"
,[ScreenShotsAppDelegate sharedDelegate].viewController.curImage.imageID];
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:url1]];

调用openURL时会发生什么


您可以尝试对引号(%22)、小于(%3C)和大于(%3E)的字符进行编码。

建议不错,但仍然不可行。它不会产生错误,只是不会启动邮件应用程序。我尝试在正文中不使用html,但效果很好。您能给我们显示一个失败的'url1'值吗?还要检查[nsurlUrlWithString:url1]是否返回nil。看看这个问题。