i am attaching image in email.but how can we attach html file in email ?
here is code by which i am attaching image file in an email.
i have tried following code to attach html file but it is not working.
How can we attach HTML?.
I don't want to set HTML as body, i want to send HTML as attachment.
this is very urgent.
kindly guide me regarding this issue.
here is code by which i am attaching image file in an email.
Code:
UIImage *artworkImage = viewImage;
NSData *artworkJPEGRepresentation = nil;
if (artworkImage)
{
artworkJPEGRepresentation = UIImageJPEGRepresentation(artworkImage, 0.7);
}
if (artworkJPEGRepresentation)
{
[composeVC addAttachmentData:artworkJPEGRepresentation mimeType:@"image/jpeg" fileName:@"Image.jpg"];
}
[self presentModalViewController:composeVC animated:YES];
[composeVC release];
i have tried following code to attach html file but it is not working.
Code:
NSData* htmlAttach = [NSData dataWithContentsOfFile:filepath];
[composeVC addAttachmentData:htmlAttach
mimeType:@"text/html"
fileName:@"html-file.html"];
How can we attach HTML?.
I don't want to set HTML as body, i want to send HTML as attachment.
this is very urgent.
kindly guide me regarding this issue.