Search code examples
iphoneiosipadmfmailcomposeviewcontrollermfmailcomposer

Sending an Email on one click (Without showing MFMailComposerView)


This may be a duplicate question but after searching it I couldn't find the answer which can help me.

So, I want to send an email from the synced account on the device to an address on just one click.

The idea of doing it as a Panic Button - when user clicks the panic button it automatically sends some information provided by the user previously, to the server.

How can I achieve it? Does Apple allows this?

Thank you


Solution

  • No, I dont think Apple will allow such a thing. Sending mails will have to be initiated through the user action and that is what Apple recommends. The only way I think that you can send through the app using documented APIs is through the user actions. You may risk getting your app rejected if you try to send it without the user action.

    Think of it this way, an app sends some confidential information to a server when the user clicks a button on the app using the account of the user. This is not something that Apple wants, risking exposure of user's personal information without the knowledge of the user.