Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

uaecasher

macrumors 65816
Original poster
Jan 29, 2009
1,289
0
Stillwater, OK
hello,

I want to include a link in message body of an in-app email, I've got the in-app to work but not sure how to add the link generated by the app in message body, I save the link in an NSString called "returnString"

my body message is set to nil at the moment.

Code:
[mailComposer setSubject:nil];

Thanks :)
 
What, exactly and in detail, is not working or confusing when you use the clearly documented setMessageBody:isHTML: method?

I have an image uploading app, I want the body to have the link of the image after it was uploaded, I checked the HTML option but I think that option would work with a fixed link right?

sorry if I wasn't clear in initial message, thank you.
 
I have an image uploading app, I want the body to have the link of the image after it was uploaded, I checked the HTML option but I think that option would work with a fixed link right?

sorry if I wasn't clear in initial message, thank you.

Yes, if you set the message body to syntactically correct HTML then it should work. The best way to find out it is to try it.
 
Usual rules: post your code.

using this tutorial: http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/

I used the NSString *returnString in setMessagebody

Code:
NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];

.......

-(IBAction)sendMail {
	
	MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
	mailComposer.mailComposeDelegate = self;
	
	if ([MFMailComposeViewController canSendMail]) {
		
		[mailComposer setToRecipients:nil];
		[mailComposer setSubject:nil];
		[mailComposer setMessageBody:returnString isHTML:YES];
		
		[self presentModalViewController:mailComposer animated:YES];
		
	}
}

I get 'returnString' undeclared
 
Where, exactly, is return string declared (I assume it's not just floating in space as in your code. If it's an instance variable of the object declare it as such in the .h file. If that's part of another method then obviously it's not going to be in scope where you are trying to use it.
 
Where, exactly, is return string declared (I assume it's not just floating in space as in your code. If it's an instance variable of the object declare it as such in the .h file. If that's part of another method then obviously it's not going to be in scope where you are trying to use it.

it's part of another method, I though this might be the problem. how could I save it to something accessible by another method?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.