views:

36

answers:

1

Hello there - I have an in-app mail composer. I would like to add an image at the bottom of the email body with a http link wrapped around it (usual business )

The image is in my resources. My goal is to add the image and have link the image to the app store.

How do I do that?

That's how I am attaching the image right now:

NSString *path = [[NSBundle mainBundle] pathForResource:@"appIcon" ofType:@"png"];
NSData *myData = [NSData dataWithContentsOfFile:path];
[picker addAttachmentData:myData mimeType:@"image/png" fileName:@"appIcon"];
A: 

I would suggest encoding image with base64 Example, and using with HTML mail body. It is less painful, and more practical.

<img alt="Embedded Image" 
  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
Deniz Mert Edincik