I am using MFMailComposeViewController for sending the Email,
With this code I am able to get the Image, But image comes after the Text Detail,
I wan’t First Image and after Text,
Here is my code,
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
mail.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
//Setting up the Subject, recipients, and message body.
[mail setToRecipients:[NSArray arrayWithObjects:Emailid,nil]];
[mail setSubject:@"Receipt"];
NSData *photoData = UIImageJPEGRepresentation([UIImage imageNamed:@"Gift.png"], 1);
[mail addAttachmentData:photoData mimeType:@"image/jpg" fileName:[NSString stringWithFormat:@"photo.png"]];
[mail setMessageBody:@"Receipt" isHTML:NO];
NSString *emailBody;
emailBody = [NSString stringWithFormat:@
"<br>Purchase Amount: </br> " "$ %@"
"<br>Amount Received: </br> " "$ %@"
"<br>Change: </br> " "$ %@"
,AmountData,txtAmount.text,ChangeAmount.text];
[mail setMessageBody:emailBody isHTML:YES];
Please any body suggest me How can i do that?
as of my knowledge this is the default behavior of the mfmailcomposeviewcontroller instead of just adding image as attachment you can do as below to show image first just to create body part
this is shown here