tags:

views:

242

answers:

2

I am trying to send the user to the mail app from my native app. I would like the embed a tag into the body of the message. I know this is possible because the 'LOL Cats' app does it. I have been trying without success:

    NSString *url1 = [NSString stringWithFormat:@"mailto:[email protected]?subject=Check%20Out%20This%20Faux%20Screen&body=<img%20src=\"http://www.sample.com/FauxFoneServer/screenShot/getScreenByID?cur=%@\"/&gt;The%20awesome%20person%20who%20sent%20you%20this%20email%20thinks%20you%20should%20visit%20http://www.fauxscreen.com"
             ,[ScreenShotsAppDelegate sharedDelegate].viewController.curImage.imageID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url1]];
+1  A: 

What happens when you call openURL?

You can try encoding the quotation mark (%22), less-than (%3C) and greater-than (%3E) characters.

Chris Lundie
Good suggestion but still no go. It does not create an error it simply does not launch the mail app. I tried with no html in the body and it worked fine
Joe Cannatti
Can you show us a value of 'url1' that fails? Also check if [NSURL URLWithString:url1] is returning nil.
Chris Lundie
A: 

Have a look at this SO question.

http://stackoverflow.com/questions/531623

epatel