Attaching but not embedding image in email using MFMailComposeViewController

85 views Asked by At

I need to send an email with an image attached and NOT in the body of the email.

This is an abbreviated version of what I am doing. I tried setting isHTML to no. But no matter what I try, the image gets embedded in the email, and my client wants it as an attachment.

MFMailComposeViewController *mailComposeController = [[MFMailComposeViewController alloc] init];
[mailComposeController setSubject:subject];
[mailComposeController setMessageBody:@"" isHTML:NO];

[mailComposeController addAttachmentData:image mimeType:@"image/png" fileName:filename];
[self presentViewController:mailComposeController animated:YES completion:nil];

Is there a different way to do this, or does it just depend on the mail client that it is received in?

0

There are 0 answers