Sending automatic email using Swift and Xcode 6

How do you send an automatic email in an iOS fast app? I do not want to use MessageUI because it is not automatic. How could you do this?

+2
source share
3 answers

If you want to send emails programmatically, I would use MailCore to use the SMTP / IMAP protocols. It works on both OSX and iOS! Here's a great example of SMTP in Swift: Sending regular Mailcore2 emails to Swift

+4
source

The fact is that Apple does not allow sending emails in the background. I ran into this problem. You will need to allow the user to confirm sending. Therefore, create mail and let it pop up, then the user just needs to click send.

This, unfortunately, is the only way to do this.

Hope this helps :)

+1
source

Apple does not allow sending emails in the background without user interaction. The only way to do this is with this blog. http://iosameer.blogspot.in/2013/01/sending-e-mail-in-background-from-ios_25.html This will definitely work for you.

0
source

Source: https://habr.com/ru/post/1234774/


All Articles