Sending an Email on one click (Without showing MFMailComposerView)

1.5k Views Asked by At

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

3

There are 3 best solutions below

0
On BEST ANSWER

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.

0
On

we cannot send email programmatically in background. Sending emails programmatically without user intervention cannot be implemented using apple frameworks. user need to click send button in the apple mailcomposer page to send email.

0
On

It is definetely possible. Use MailCore. It is an Objective C wrap over LibetPan C mailing library. Here is the instructions and example of sending e-mail on my blog.