我正在通过我的应用程序发送电子邮件,我setMessageBody
可以将正文设置为我的邮件,但我的要求是我想发送多个图像和文本
使用addAttachmentData
两次我可以发送两个图像,但我想发送文本图像文本图像。
使用 html 在 gmail 中不起作用是否可以这样发送?
MFMailComposeViewController *mailView= [[MFMailComposeViewController alloc] init];
mailView.mailComposeDelegate=self;
[mailView setSubject:@"ABCD"];
[mailView setMessageBody:@"Hai" isHTML:NO];
UIImage * emailimage = [UIImage imageNamed:@"Iconpaid.png"];
NSData * emaildata = UIImageJPEGRepresentation(emailimage, 1.0);
[mailView addAttachmentData:emaildata mimeType:@"image/png" fileName:@"File"];
// Here i want to add text
[mailView addAttachmentData:emaildata mimeType:@"image/png" fileName:@"File"];
[mailView setToRecipients:[NSArray arrayWithObject:@""]]; //[NSArray arrayWithObject:appDelegate.mechanicEmail]];
[self presentModalViewController:mailView animated:YES];