0

I have inherited an app that, when certain conditions are met, will email data to a known server. The way the previous version worked is that the MFMailComposeViewController would slide up and the user could enter add'l info and then hit send. What we really want to do is send an email programmatically, transparently to the user (i.e. no visual representation unless it fails).

Is this possible, or does Apple not like apps to do this?

Thanks for any help.

Chris
  • 629
  • 1
  • 10
  • 28
  • 1
    You cant... the only way to do this is send the data to a server and have the server send it out. Apple doesn't want you sending emails from an app without the user knowing. – logixologist Sep 17 '14 at 19:40
  • @logixologist Not really true. There are apps that send their own emails and as you stated, sending the data to a server is perfectly fine. – rmaddy Sep 17 '14 at 20:00
  • 1
    @Chris Is your goal to really send an email or is your goal just to get data and some text to your own server? – rmaddy Sep 17 '14 at 20:01
  • thanks @rmaddy, I wasn't aware that there were frameworks out their that could achieve that with apple allowing those apps. Either way I still think the user needs to be notified that an email is being sent. – logixologist Sep 17 '14 at 20:43

1 Answers1

2

IOS doesn't support to mail in background.

These are some questions asked previously on same topic.

1.Send Email in Background from iOS

2.How to send an email to a receipent in background in iOS5?

this might be useful to you.

http://iosameer.blogspot.ca/2013/01/sending-e-mail-in-background-from-ios_25.html

one more thing you can do is lock the fields in mail composer view.

Locking the Fields in MFMailComposeViewController

Community
  • 1
  • 1
Avis
  • 505
  • 4
  • 14
  • I never tried last two links, but might be helpful to you. The only thing i always use is web services. – Avis Sep 17 '14 at 20:08