sending content of the labeles in a specific email
I need the code for my app. When the user wants to send message to me, I
need the content of labels go to my email when he press the icon send.
I tried this:
-(void) sendEmailTo:(NSString *)to withSubject:(NSString *)subject
withBody:(NSString *)body {
NSString *mailString = [NSString
stringWithFormat:@"mailto:?to=%@&subject=%@&body=%@",
[to
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
[subject
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
[body
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailString]];
}
No comments:
Post a Comment