有人可以幫我使用下面的代碼嗎?對於iOS中發送電子郵件,是下面的代碼,一個好或者我應該使用MFMailComposeViewController比這個?:使用mailto發送電子郵件:URL
NSString *url = [NSString stringWithString: @"mailto:[email protected][email protected]&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];NSString *url = [NSString stringWithString: @"mailto:[email protected][email protected]&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
是否發送郵件的可靠的代碼?
您不需要在字符串上使用'stringWithString:'。它已經是一個字符串。 (事實上,有幾個原因可以稱爲'stringWithString:'永遠。) –