How to send an email to a receipent in background

2020-02-05 19:11发布

In an iPhone app,I want to send an email to a person who has forgotten about their passcode . I want to send the mail in background (cant use MFMailComposeViewController for this) and also the app must not be pushed to background . Is there a way to achieve this?

8条回答
别忘想泡老子
2楼-- · 2020-02-05 19:58

May be you should implement PHP script that will send out email to user. In ios, you can use POST method in NSURLConnection to call PHP script. You can find many scripts on Google to send out email to user.

查看更多
Emotional °昔
3楼-- · 2020-02-05 20:00

In reference to the PostageApp comment below if you wanted to send emails without any hassle of setting up an SMTP client you can check out the PostageKit wrapper for using the PostageApp service. Let's you send emails with a couple lines of code reliably.

https://github.com/twg/PostageKit

查看更多
登录 后发表回答