Search code examples
iphoneemaillaunching

How to send via my iphone application a planned emails and without launching the email application?


I know how to send email from my application by launching the iPhone Mail application, then return to my app. But I have two concerns:

1 / My first concern is how my application can send emails without opening the mail application?

So I will inform the user that the email has been sent successfully or failure on failure of transmission.

2 / My second concern is to make sending mail programmed (in scheduled task) as in the case of UILocalNotification.

I have not found a solution, I try to avoid knowing the solution that uses open source classes for sending mail via SMTP, because I want my application uses the configuration of the iphone and mail ask the user to configure where the mail is not configured.

Thank you in advance for your help.


Solution

  • You can send mail from your app using MFMailComposeViewController.

    http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html