1 with your own mail client, after sending the message will not automatically return to the original application 2 nsurl *url = [Nsurl urlwithstring:@ "mailto:/ /[email protected]"; 3 [[UIApplication sharedapplication] openurl:url];
1 the 2nd method of texting is similar, except that the controller class name is: Mfmailcomposeviewcontroller2 3 the Proxy method callback after the message is sent, will automatically return to the original application after sending4- (void) Mailcomposecontroller: (Mfmailcomposeviewcontroller *) controller didfinishwithresult: (mfmailcomposeresult) result Error: (Nserror *) Error5 {6 //Close the Mail interface7 [Controller Dismissviewcontrolleranimated:yes Completion:nil];8 9 if(Result = =mfmailcomposeresultcancelled) {TenNSLog (@"Cancel Send"); One}Else if(Result = =mfmailcomposeresultsent) { ANSLog (@"has been issued"); -}Else { -NSLog (@"Send failed"); the } -}
iOS e-mail