TML attachment help..

smsawant

New member
Aug 4, 2009
1
0
0
Visit site
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.

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.
 

Trending Posts

Members online

No members online now.

Forum statistics

Threads
260,368
Messages
1,766,594
Members
441,240
Latest member
smitty22d2