Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I send email programmatically in iPhone app?

I need to be able to send a pre-formatted email or SMS text message programmatically from within an iphone app. Can this be done? I have looked at apple's MFMailComposeViewController class, but this "provides a standard interface that manages the editing and sending an email message" and the MFMessageComposeViewController class also has it's own "standard system interface for composing SMS text messages". These allow you to present an interface to the user where they have to fill in all the data and then explicitly press a send button.

I cannot use this boilerplate functionality.

I need to be able to send a message without presenting any interface to the user. I know this sounds evil, but actually it is for a commercial application which needs to communicate to a user group in a central office when users in the field have performed specific actions out in the field.

Has anyone found a solution to this?

like image 950
jcpennypincher Avatar asked Nov 07 '10 20:11

jcpennypincher


People also ask

How do you automate email on iPhone?

at the top of the Mailboxes list, then choose Preferences. Click Auto-Reply, select “Automatically reply to messages when they are received,” then type the message you want to send. Set an optional date range; the autoreply is active from the first day of the date range until the last. Click Done.


2 Answers

After much investigation, I have found that sending emails programmatically, without user intervention, from an iphone application, cannot be implemented using any of the apple frameworks.

like image 103
jcpennypincher Avatar answered Nov 16 '22 00:11

jcpennypincher


Looking for a solution to such a problem, I found something interesting here: How to send mail from iphone app without showing MFMailComposeViewController?

I hope this will be useful!

like image 45
Panayot Avatar answered Nov 15 '22 22:11

Panayot