Search code examples
iphonehtmlmfmailcomposer

image does not show in the E-mail body


i am trying to send an html page which includes image and text. The problem is that image in not shown when i send it. what could be the solution for it ? thaks in advance..

My code is :

[picker addAttachmentData:myData mimeType:@"pdf" fileName:@"ShowerDoorsQuotation.pdf"];
NSString *emailBody = [NSString stringWithFormat:@"<html>
  <head>
  </head>
  <body><img  src='ShowerDoors/ShowerDoors/logo.png' width='150px' height='150px'/>
  </body>
  </html>"];

[picker setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:picker animated:YES];
[picker release];

Solution

  • I think you are put the image URL like this src='ShowerDoors/ShowerDoors/logo.png' Change to the FULL URL like http://www.example.com/ShowerDoors/ShowerDoors/logo.png, It may be works...