0
嗨每一個我有使用此代碼發送電子郵件,我導入頭文件和框架工作到我的應用程序它工作正常,但我無法收到電子郵件?問題在發送電子郵件Iphone
-(IBAction)sendEmail :(id)sender
{
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject: @""];
[controller setMessageBody:@" " isHTML:YES];
[self presentModalViewController:controller animated:YES];
[controller release];
}
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
NSLog(error);
[self becomeFirstResponder];
[self dismissModalViewControllerAnimated:YES];
}
請縮進您的代碼,而不是您的問題。此外,你記錄錯誤的錯誤。做這個,而不是:'NSLog(@「%@」,錯誤);'。你可能不會收到空的電子郵件。 **你看過垃圾郵件文件夾嗎?** – 2011-03-08 15:16:57