I have looked at the questions already posted, and essentially they all reference this answer (Locking the Fields in MFMailComposeViewController), and the SMTP Framework. When I attempted to implement this code every download for the framework was outdated and does not use ARC, so the framework is essentially useless for programming after iOS 5. What is a better alternative to the SMTP Framework for sending e-mails in the background?
Asked
Active
Viewed 957 times
0
-
1Why is it essentially useless after iOS5? You can still use non-arc after iOS 5. Also you can't send an email in the background the user needs to be aware of the email that is being sent. So you have to show the user the MFMailComposeViewController and when they press Done/Send/Confirm (Which ever it is) the email will get sent there and then. Apple don't allow emails to be sent in the background without the user knowing about it. – Popeye Aug 07 '14 at 08:46
-
I have already developed an entire app with ARC and this is the final stage of the app before the release, and sending the e-mail in the background is more. "Enter your e-mail" Then I use a example@email.com to mail their e-mail address to example@email.com – V-FEXrt Aug 07 '14 at 13:11
-
2You can't send emails in the background you need to be showing the user the `MFMailComposeViewController` if you don't show them this and allow them to press the send button you app will be rejected straight away. You can populate as many fields as you want in that controller but you need to be showing it to the user you don't have a chose in the matter unless you want to be rejected, so I would rethink your design. As for arc you can still have non-arc files in an app that uses arc. Just add `-fno-objc-arc` to the file in `build Phases>Compile Sources` and that file will not use arc – Popeye Aug 07 '14 at 13:57
-
Thanks! I got the e-mail functionality that I was looking for! – V-FEXrt Aug 08 '14 at 08:25
-
If you got this working from the sending in the background be prepared to have this rejected as that isn't allowed. – Popeye Aug 08 '14 at 08:37
-
The user is notified that the e-mail is sent, actually the user has to press a button to send the email. Then the user is asked for an e-mail address. The address they enter is made the subject like of an e-mail that is then sent from `my.email@email.com` to `my.email@email.com` – V-FEXrt Aug 10 '14 at 14:48
-
That isn't what your question is asking. You specifically say `"How do you send e-mails in the background on iOS"` so you do show the user the `MFMailComposeViewController`? – Popeye Aug 12 '14 at 08:34
-
Correct `MFMailComposeViewController` isn't being shown, but it does inform that an email has been sent – V-FEXrt Aug 13 '14 at 03:38
-
That doesn't matter you need to be showing them the `MFMailComposeViewController` this will get rejected otherwise and why reinvent the wheel? – Popeye Aug 13 '14 at 08:19