0

So it seems like this question iOS - Send an email automatically (NOT from user's account) tackles this in Objective-C but I can't find an answer for Swift.

I am creating an app for the app store so ideally this needs to be compliant with Apple's privacy restrictions (I know they have issues sending emails/texts in the background)-

I need to have an email with a SET message body (As in nothing is editable by the user, its all pre programmed) sent from one of MY email addresses (not accessing the user's at all) to another of MY email addresses (again, pre set).

Ideally I don't want the user to see the email form or even know an email is being sent - when a button is clicked, the button already does 1 thing and I just want the email function to be called along with it. I know Apple doesn't allow email to be transparent to the user if being sent from their email address but as this is from one of my email addresses I can't see why I'd be violating anything.

I have looked but can't figure out how to do this in the BACKGROUND (not pulling up the mail form, etc).

In Swift, How can I send a set email from one of my email addresses to another of my email addresses in the background?

Community
  • 1
  • 1
blue
  • 7,175
  • 16
  • 81
  • 179
  • 1
    Your question's title and the last sentence of your question are asking two completely different questions. Please clarify. – rmaddy Jun 06 '16 at 19:34
  • I think they're asking the same question.. I need to send an email in my apps background from one set email address to another. Thats it. – blue Jun 06 '16 at 19:42
  • 1
    Have you tried porting the Objective C solution? – Alexander Jun 06 '16 at 19:45
  • You mention your email address…how do you plan to "sign in" to the email on the iOS device? – saagarjha Jun 06 '16 at 19:51
  • "...button is clicked, the button already does 1 thing and I just want the email function to be called along with it." How is it in the background if the user is clicking a button? – Gruntcakes Jun 06 '16 at 19:59
  • This is a duplicate of [this question](http://stackoverflow.com/questions/31485359/sending-mailcore2-plain-emails-in-swift). – David S. Jun 06 '16 at 20:14
  • Your title and question are different; one asks is it ok for App Store (it is) and then the question asks how. For this I would suggest you look at MailGun – Paulw11 Jun 06 '16 at 20:44

0 Answers0