1. smsawant's Avatar
    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.
    08-04-2009 09:01 AM
LINK TO POST COPIED TO CLIPBOARD