Welcome to the iMore Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 1 of 1
  1. Thread AuthorThread Author   #1  
    smsawant's Avatar
    iPhone Nanite

    1 Posts

    Default TML attachment help..

    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.

    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.
    NSData* htmlAttach = [NSData dataWithContentsOfFile:filepath];
    [composeVC addAttachmentData:htmlAttach
    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.

Posting Permissions