我已经使用下面的代码从我的iPad应用程序发送电子邮件。电子邮件编辑器打开,但是当我按下发送按钮时,什么也没有发生。有任何想法吗?发送按钮不发送
MFMailComposeViewController *mailComposer;
mailComposer = [[MFMailComposeViewController alloc] init];
mailComposer.mailComposeDelegate = self;
[mailComposer setModalPresentationStyle:UIModalPresentationFormSheet];
[mailComposer setSubject:@"your custom subject"];
[mailComposer setMessageBody:@"your custom body content" isHTML:NO];
[self presentViewController:mailComposer animated:YES completion:nil];
非常感谢
你什么意思是“什么都没有发生”?它不发送电子邮件或不被解雇(或者也许都是......)? – Alladinian
没什么。作曲家停留在屏幕上,没有任何东西被解散。我不确定它是否实际发送,因为我不确定是否应该期望它在模拟器模式下运行时实际发送。我没有收到任何邮件。 – RGriffiths