What I already found is
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@\"mailto:\"]];
But I just want to open the Mail ap
Swift 5 version:
if let mailURL = URL(string: "message:") {
if UIApplication.shared.canOpenURL(mailURL) {
UIApplication.shared.open(mailURL, options: [:], completionHandler: nil)
}
}
You can open the mail app without using opening the compose view by using the url scheme message://
You might want to use a scripting bridge. I used this method in my App to directly give the user the option to send e-mail notifications using the built in Mail.app. I also constructed an option to do this directly over SMTP as an alternate.
But since you want to use Mail.app method, you can find more information about how to do that solution by following this:
https://github.com/HelmutJ/CocoaSampleCode/tree/master/SBSendEmail
Good Luck!