我正在使用此链接在电子邮件正文中发送带有一些文本的图像,我的代码如下所示
NSString *urlString = @"url";
NSString *searchingurl = [NSString stringWithFormat:@"%@%@", urlString,idnumber];
NSString *string = [NSString stringWithFormat:@"%@<br><br>Item No :%@<br>Type :%@<br>Size : %@",searchingurl,str123,mytype,itemsize];
NSMutableString *emailBody = [[[NSMutableString alloc] initWithString:@"<html><body>"] retain];
NSData *imageData = UIImageJPEGRepresentation(myImage, 1.0f);
NSString *encodedString = [imageData base64Encoding];
[emailBody appendString:[NSString stringWithFormat:@"<p><b><img src='data:image/png;base64,%@'></b></p>",encodedString]];
[emailBody appendString:string];
[emailBody appendString:@"</body></html>"];
NSLog(@"%@",emailBody);
MFMailComposeViewController *emailDialog = [[MFMailComposeViewController alloc] init];
emailDialog.mailComposeDelegate = self;
[emailDialog setSubject:@""];
[emailDialog setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:emailDialog animated:YES];
[emailDialog release];
[emailBody release];
以上代码的屏幕显示
向雅虎发送邮件后,它会在 Mackbook 和 iPhone 设备上显示我的图像和文本,当我向 Gmail 发送邮件并在 iphone 设备中检查它时,它会显示带有文本的图像,但是当我在 Mackbook 中检查 gmail 时,它不会显示我的图像
有人可以指导我为什么我的图片没有显示在 PC 上的 Gmail 中。任何帮助都会得到帮助。谢谢