如何在不使用 MFMailComposeViewcontroller 的情况下发送电子邮件
我想知道是否可以使用 uibutton 自动发送电子邮件,而不必使用 MFMailComposeViewController?我基本上想发送电子邮件而不让用户编辑收件人地址或主题。
例如,当您按下 uibutton 时,它会自动发送以下内容:
[mailComposer setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[mailComposer setSubject:@"Hello there"];
[mailComposer setMessageBody:@"Body" isHTML:NO];
Any idea how to do this please?
I want to know if it's possible to send an e-mail automatically by using the uibutton, instead of having to use the MFMailComposeViewController? I basically want to send an e-mail without letting the user edit the recipients address or the subject.
For example, when you press the uibutton it would automatically send these:
[mailComposer setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[mailComposer setSubject:@"Hello there"];
[mailComposer setMessageBody:@"Body" isHTML:NO];
Any idea how to do this please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的应用中实现 SMTP 客户端。
MFMailComposeViewController
无法自动化、以任何方式受到限制或稍后更改。我不希望应用程序向我的所有联系人发送垃圾邮件,苹果也考虑到了这一点。
implement a SMTP client in your app.
MFMailComposeViewController
can't be automated, limited in any way or changed later.I don't want apps that send spam mails to all my contacts, and apple thought about this too.