Search code examples
iphonexcodeemailuibuttonmfmailcomposeviewcontroller

How to send an e-mail without using the MFMailComposeViewcontroller


I want to know if it's possible to send an e-mail automatically by using the uibutton, instead of having to use the MFMailComposeViewController? I basically want to send an e-mail without letting the user edit the recipients address or the subject.

For example, when you press the uibutton it would automatically send these:

[mailComposer setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[mailComposer setSubject:@"Hello there"];
[mailComposer setMessageBody:@"Body" isHTML:NO];

Any idea how to do this please?


Solution

  • implement a SMTP client in your app.

    MFMailComposeViewController can't be automated, limited in any way or changed later.

    I don't want apps that send spam mails to all my contacts, and apple thought about this too.