iPhone MFMailComposeViewController
我必须在其中一个应用程序中发送一封电子邮件,我已经实现了 MFMailComposeViewController 并且一切正常,邮件也可以发送和接收。
然而我的主要问题是,是否可以在不打开 MFMailComposeViewController 工作表的情况下发送邮件?
意味着在我的应用程序中,我必须将 url 传递到 suject 字段,并且必须在文本字段中输入收件人姓名,那么我们是否无法打开 messagecontroller 窗口的工作表并从 uibarbutton 集成发送邮件?
请告诉我
I have to send an email in one of the application,i have implement MFMailComposeViewController and everything is working fine, mail can be send and received also.
However my main issue is that, is it possible to send mail without opening the Sheet of MFMailComposeViewController ?
Means in my application I have to pass on url into suject field and have to type the recepients name in textfield, so is it that we cannot open the sheet of messagecontroller window and send the mail from the uibarbutton integration?
plz let me know that
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您不想使用 MFMailComposer,您可以使用以下代码。您必须通过字符串操作处理文本字段的邮件 ID,并将其附加到正文之前的 mString 中。您可以使用 UItextview 作为正文。
If you dont want to use MFMailComposer, you may use following code.You have to handle you textfield's mail id's through string manipulation and append it in mString before body.you may use UItextview for body.
为了防止垃圾邮件使用用户邮箱,应用程序无法自动发送邮件。用户必须自己按“发送”。这样,他们就知道发出的电子邮件是什么。
如果您希望应用程序自动发送邮件,则必须设置自己的 SMTP 客户端/服务器。
To prevent spam from using the user mailbox, application cannot send mail automatically. THe user will have to press "Send" themselves. This way, they know what e-mail is going out.
If you want your app to automatically send mail, you will have to setup your own SMTP client/server.