Home Answers Viewqa Mobile-Applications MFMailComposeViewController image attachment

 
 


Java Coder
MFMailComposeViewController image attachment
1 Answer(s)      a year and 10 months ago
Posted in : MobileApplications

How can we attach an image in MFMailComposeViewController?

View Answers

July 7, 2011 at 1:21 PM


- (void)createEmail {
   NSMutableString *emailBody = [[[NSMutableString alloc] initWithString:@"<html><body>"] retain];
   [emailBody appendString:@"<p>Some email body text can go here</p>"];
   UIImage *emailImage = [UIImage imageNamed:@"myImageName.png"];
   NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(emailImage)];
 
   NSString *base64String = [imageData base64EncodedString];
  [emailBody appendString:[NSString stringWithFormat:@"<p><b><img src='data:image/png;base64,%@'></b></p>",base64String]];
  [emailBody appendString:@"</body></html>"];
    NSLog(@"%@",emailBody);

 //mail composer window
    MFMailComposeViewController *emailDialog = [[MFMailComposeViewController alloc] init];
    emailDialog.mailComposeDelegate = self;
    [emailDialog setSubject:@"My Inline Image Document"];
    [emailDialog setMessageBody:emailBody isHTML:YES];

    [self presentModalViewController:emailDialog animated:YES];
    [emailDialog release];
    [emailBody release];
}









Related Pages:
MFMailComposeViewController image attachment
MFMailComposeViewController image attachment  How can we attach an image in MFMailComposeViewController
mfmailComposeViewController link
mfmailComposeViewController link  Is there any way to get a hyperlink on email text using mfmailComposeViewController in my iPhone application?  .... MFMailComposeViewController also support it. See the below given code
iPhone - MFMailcomposeviewcontroller example
iPhone - MFMailcomposeviewcontroller example  Hi! I'm looking for a mfmailcomposeviewcontroller example for both iPhone and iPad. Any suggestion?? Thanks
Sending Email with Attachment
Sending Email with Attachment       This Example shows you how to send a Attachment in the message using... attachment in the content and Finally, it sends the Message by invoking
_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
_OBJC_CLASS_$_MFMailComposeViewController", referenced from:   While configuring the email feature in my ipad application, i get the following error message. "OBJCCLASS$MFMailComposeViewController", referenced from: Can
Read attachment message using Java Mail
Read attachment message using Java Mail   ... a Attachment message using javamail api. Java Mail API provides classes to send multiple... or image. All message are stored in Folder objects. folders can contain folders
php send mail with attachment
php send mail with attachment  Syntax of sending email with attachment in PHP
Webservices with attachment on websphere - WebSevices
Webservices with attachment on websphere  Need some help urgently!!! I need to provide an interface with webservices to access one of our services...). 2. Have some one some example ready for attachment with webservices
upload attachment - Spring
upload attachment  java code in register form to upload an attachment storing in blog and clog   Hi Friend, Are you using JSP or Java Swings? Please clarify this. Thanks
send the mail with attachment - Struts
send the mail with attachment   Hi Freinds, i am sending the mail without attachment file now. But i need to send the mail with attachment in struts. when i added the attachemt logic in struts,i am not able to send
AXIS ATTACHMENT MISSING - WebSevices
AXIS ATTACHMENT MISSING  Hi, i have a method which takes a filename... the attachment before returning. Kindly guide. Following is the server side code...(); // create an attachment and set its mime type AttachmentPart
To insert attachment file in database in JSP.
To insert attachment file in database in JSP.  I am doing project in JSP. How to insert attachment file in mysql database? Please suggest some solution. Your inputs is valuable to me.   Hi Friend, Visit Here Thanks
sending mail with attachment in jsp - JSP-Servlet
sending mail with attachment in jsp  Hi Experts
send the mail with attachment problem - Struts
send the mail with attachment problem  Hi friends, i am using... InternetAddress(to)); message.setSubject("JavaMail Attachment...(messageBodyPart); // Part two is attachment messageBodyPart
To insert attachment file in database in JSP.
To insert attachment file in database in JSP.  I am doing project in JSP. How to insert attachment file in mysql database? Please suggest some solution. Your inputs is valuable to me.   Hi Friend, Try the following
sending mail with attachment in jsp - JSP-Servlet
sending mail with attachment in jsp  Hi, Can any one pls tell me how to send email with attachment in jsp. I know how to send mail without attachment but with attachment its not working for me. If u hve any idea please
how to set image - EJB
how to set image   public ActionForward execute(ActionMapping mapping...", // "attachment;filename=sample_report.pdf"); ServletOutputStream ouputStream... coding to ireport. this coding only getting database fields. i need add one image
image
image  how to add the image in servlet code
Image
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
Image
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
Image
Image  how to insert image in xsl without using xml. the image was displayed in pdf..Please help me
Inserting Image In Excel Sheet Using JSP
Inserting Image In Excel Sheet Using JSP... and display image on that. We can request that the browser open the results... as: response.setHeader("Content-Disposition", "attachment; filename=\"mult-table.xls\"
how to make an image act like upload dialog box
the upload dialog box to be accessed from an image, like an attachment image. i was thinking of making onclick on the image but i do not know what kind of code. maybe...how to make an image act like upload dialog box  dear sir: i have
how to make an image act like upload dialog box
the upload dialog box to be accessed from an image, like an attachment image. i was thinking of making onclick on the image but i do not know what kind of code. maybe...how to make an image act like upload dialog box  dear sir: i have
How to set attachment from browse button to send mails using java mail api
How to set attachment from browse button to send mails using java mail api... in jsp and servlet in that i have to make attachment option available using browse button but attachment is not loading properly using browse button because
image scrolling
image scrolling  A brief description of scrolling image
Image Steganography
Image Steganography  SOURCE CODE FOR IMAGE STEGANOGRAPHY
How display a Image on Servlet from file upload - JSP-Servlet
(); res.setContentType("image/jpg"); res.setHeader("Content-Disposition", "attachment...How display a Image on Servlet from file upload  Dear Sir, My requirement is I want to display a Image on Servlet from File Upload
image format
image format  what are the different format available in image
image format
image format  what are the different format available in image
image in database
image in database  how to set image in database and retrieve it using servlet(java)in msaccess
Image_creation
Image_creation  how to create an image from a set of pixel values stored in array - in java
image scrambling
image scrambling  Hi frinds : i want to read image and scrambling it then saved using java any help please
To scan a image encode that image in j2me
To scan a image encode that image in j2me  Hai team i am new man of j2me i have doubt to scan a image and encode the image in j2me... Please clarify that doubt... Thanks in Advance... Kumar
Icon image
Icon image  hiii how can we set image on the icon by which we can launch the application???   hello, when you will save a image named icon.png then it is automatically show this image on the icon
image Processing
image Processing   BCIF Image Compresssion Algorithm s alossless image Compression algorithm ,Pleas Help Me weather it can support only 24 bit bmp images
Image processing
Image processing  i want a browsing program in java in which we hv a small img and we hv to browse this img on a big image so that we can find the similar type of image in big img
scrolling image
scrolling image  How create a scrolling image in java
UIButton with image
UIButton with image  Hi, How to create UIButton with image? Thanks
PDF to Image
PDF to Image  Java code to convert PDF to Image
TextField on the Image
TextField on the Image  how we set label or textfield etc. on the Image
update image
update image  sir, I want to do update image into database
image retreival
image retreival  I ve stored the path of image and audio in mysql database. how to retrive it and display... Can u pls help me out
image display
image display  Hai Friends..... Actually I uploaded filepath into database and image into a folder. Now i want to show that image as my profile photo. How it is?...Friends Can you help me? Thanks in advance to take time
image display
image display  Hai Friends..... Actually I uploaded filepath into database and image into a folder. Now i want to show that image as my profile photo. How it is?...Friends Can you help me? Thanks in advance to take time
image Processing
image Processing  Please give Me a JPEG or GIf "LOSS LESS" Image Compression and Decompression Source Code Please Help Me I don't want links Kindly help me Compression ratio not matter
image steganography
image steganography  Hello.could you please tell me how to start developing code for image steganography?could you provide some key points showimg its implementation
image selection
image selection  hi my issue is : I have select dropdown list when I selected image it displays some default color having image I change the color... it redirect to error image page. can you tell how to solve this problem and where
Image Album
Image Album  hi, i want to save image on server folder. and i want to save URL of this folder and name of image in database.on click of a link it retrieves the image data from server folder according to URL and File name stored
Image in mysql
Image in mysql  Hi. How to insert and retrieve images in mysql db using JSP or JAVA Servlet? Thanks in advance

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.