MessageUIフレームワークを使用してメールを送信していますが、送信時にそのメールを受信しません。MessageUIフレームワークを使用して送信された電子メールを受信していません
私は、コンソールに「メール送信」メッセージが表示されますが、私は私が言ったように私は#import <MessageUI/MessageUI.h>
をインポートしていますし、私は次のコード
- (void)emailFile
{
if(![MFMailComposeViewController canSendMail]) {
UIAlertView *cantSend = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Device not configured to send email" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[cantSend show];
[cantSend release];
} else {
MFMailComposeViewController *mailView = [[[MFMailComposeViewController alloc] init] autorelease];
mailView.mailComposeDelegate = self;
[mailView setToRecipients:[NSArray arrayWithObject:@"[email protected]"]];
[mailView setSubject:@"Test"];
[mailView setMessageBody:@"This is a text message" isHTML:NO];
[self presentModalViewController:mailView animated:YES];
}
}
と
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{
if(error) {
UIAlertView *errorView = [[UIAlertView alloc] initWithTitle:@"Mail Error" message:[error localizedDescription] delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[errorView show];
[errorView release];
} else {
switch (result) {
case MFMailComposeResultSent:
NSLog(@"Sent Mail");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail Saved");
break;
case MFMailComposeResultCancelled:
NSLog(@"Mail Cancelled");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail Failed");
break;
default:
break;
}
}
[controller dismissModalViewControllerAnimated:YES];
}
を持っています私は送信している電子メールを受け取ることはありません。
私はリンゴの文書を読みましたが、他の誰かが私を助けてくれるものが見つかりませんでした。私は何か間違っているのですか?
使用しているメールの送信メールボックスを確認しましたか? –