if let url = URL(string: "mailto://[email protected]") {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.openURL(url)
} else {
print("Cannot open URL")
}
}
NSURL *url = [NSURL URLWithString:@"mailto://[email protected]"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
} else {
NSLog(@"Cannot open URL");
}