Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why MFMailComposer with <img> is not showing the image in mail?

I am sending some images in mail using MFMailComposer. I am converting the image to Base64 and using <img> tag to add images to the HTML body(I am not adding it as attachment).

[htmlString appendFormat:
@"<img src='data:image/png;base64,%@' width=300 height=200 />", imageAsBase64];

The images are displaying correctly in MFMailComposer, but there are no images displayed in the actual mail which is sent from the MFMailComposer.

What should I do to make it work?

like image 739
EmptyStack Avatar asked Jul 07 '11 07:07

EmptyStack


1 Answers

I had same problem before couple of weeks and I came to know that Gmail is not supporting embedded images. You can see images in email in other mail provider like your domain email but not in Gmail.

Try to send another email and you can see images. You need to add images as attachment then you can see images and it will display bottom of your email body.

Hope this help.

like image 141
Deeps Avatar answered Nov 04 '22 17:11

Deeps