i am working on signup feature. In this feature when the user create account successfully. i am asking him or her to activate his account. i want to open the mail application of iphone if user say yes. now my question is simple how to open mail application from my own application?
Apple Mail It comes built into every iPhone, and it supports just about any account type you'd like. It's easy to start new messages. It's fast to do tasks like archive, delete, move to folders, etc.
"Get the mail.com iOS app and experience powerful mobile email while on the move. The mail.com iOS app brings comprehensive functionality to your mobile device. Perfect for iPhone and iPad users, the free email app from mail.com puts a wealth of productivity tools directly into your hand.
Show activity on this post. let email = "[email protected]" let url = URL(string: "mailto:\(email)") UIApplication. shared. openURL(url!)
#define URLEMail @"mailto:[email protected]?subject=title&body=content"
NSString *url = [URLEMail stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding ];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
Try this out.
-(void)launchMailAppOnDevice
{
NSString *recipients = @"mailto:[email protected]?subject=subjecthere";
NSString *body = @"&body=bodyHere";
NSString *email = [NSString stringWithFormat:@"%@%@", recipients, body];
email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With