Email and http :// links

Forums Programming cocos2d support (graphics engine) Email and http :// links

This topic contains 2 replies, has 2 voices, and was last updated by  mrandrey 2 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
March 17, 2012 at 11:48 am #239982


Hello. I cant figure out how to insert http:// link inside email msg body. I want my game to send an email invitation, which will contain text and an active!! link to my game in App Store. But I only get a link with only plain text, but I need and clickable link

Here is my code :

- (void) showMail


if([MFMailComposeViewController canSendMail]) {

NSString* title = [[Strings instance] getString:@”mail_title”];

NSString* msg = [[Strings instance] getString:@”mail_msg”];

MFMailComposeViewController* mail = [[MFMailComposeViewController alloc] init];

mail.mailComposeDelegate = self;

[mail setSubject:title];

[mail setMessageBody:msg isHTML:YES];

[self presentModalViewController:mail animated:NO];

[ViewController pauseEngine];

[mail release];

} else {

NSString* title = [[Strings instance] getString:@”alert_mail_title”];

NSString* msg = [[Strings instance] getString:@”alert_mail_msg”];

NSString* cont = [[Strings instance] getString:@”continue”];

ShowAlert(self, title, msg, cont, nil);



March 17, 2012 at 12:31 pm #369044


Something along these lines should work

NSString *pageLink = @"";
NSString *content = @"This an image sent using ";
NSString *emailBody = [NSString stringWithFormat:@"<p>%@<a href = '%@'>SketchShare</a>!</p>", content, pageLink];
[mail setMessageBody:emailBody isHTML:YES];

March 21, 2012 at 2:51 pm #369045


Great Thanks :)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.