在 iPhone 中使用 MFMailComposeViewController 发送的邮件没有消息内容
当用户发送邮件时,我遇到了一些问题。有时,即使用户输入了邮件内容,邮件也没有邮件内容(电子邮件正文)。邮件内容仅在某些时候不显示。(对于 10 封邮件进入我的收件箱,其中 2 或 3 封邮件没有内容在电子邮件正文中)那么请指导我为什么会发生这种情况?
这是我的代码,
- (void)viewDidLoad {
[self displayComposerSheet];
}
-(void) displayComposerSheet
{
picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[picker setSubject:@"ShoutOuts"];
}
[self presentModalViewController:picker animated:YES];
}
请帮助我。
谢谢!
I have faced some problems, when the user sent the mail. Some of the time the mail comes without message content(Email body), even the user typed the message content.The message content doesn't displayed only some times.(For 10 mail comes into my inbox, 2 or 3 messages comes without content in the email body) So please guide me why its happening?
Here my code is,
- (void)viewDidLoad {
[self displayComposerSheet];
}
-(void) displayComposerSheet
{
picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[picker setSubject:@"ShoutOuts"];
}
[self presentModalViewController:picker animated:YES];
}
Please Help me Out.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有直接的答案,但有两个提示:
a) 为什么在 viewDidLoad 中调用 displayComposerSheet?我宁愿将其放入 viewWillAppear 中,因为如果再次使用视图控制器可能已经加载并在内存中。
b) 您是否尝试使用占位符文本预先填充邮件正文以查看是否已发送?
I don't have a straight answer, but two hints:
a) Why are you calling displayComposerSheet in viewDidLoad? I'd rather put it into viewWillAppear, since the view controller might already be loaded and in memory if used once again.
b) Did you try pre-filling the mail body with a placeholder text to see if that is being sent?