0

I need to send the email without opening the MFMailCompseViewController. I have searched about this and got some point like use the web service and another one is connect with gmail server through ask the emailID and password from the user.

My email format is fixed i just have to send the email to user whose id will be given by the user without showing any thing else.

rkgarg
  • 167
  • 1
  • 1
  • 7
  • possible duplicate of [Send mail without MFMailComposeViewController](http://stackoverflow.com/questions/1263412/send-mail-without-mfmailcomposeviewcontroller) – Pawan Sharma Feb 22 '14 at 10:12

3 Answers3

0

Your existing research is accurate - you can connect to some web service to send the e-mail automatically, but you can't automatically create, configure and send using MFMailComposeViewController. The user always gets to see the presented controller and choose whether to do any editing and whether to send or not.

Wain
  • 118,658
  • 15
  • 128
  • 151
0

There is no way of sending an email directly from iDevice without showing the MFMailComposeViewController.

If it was possible it would be a great tool for mobile distributed spam bots.

Rafał Sroka
  • 39,540
  • 23
  • 113
  • 143
0

Things to consider: MFMailCompseViewController is an interface for the user to compose an email.

If you want to use it, you have to hand over control to it. Apple does not expose the underlying functionality to you: it has to go through this view controller.

If you don't want the user to be aware that you are sending emails on their behalf (I assume it is on their behalf or you wouldn't need the composer view) you are probable doing things a little wrong; why would you want to send an unsolicited email?

If you want to report information from the device, implement a web service and send it to that. Email is meant for correspondence; don't hijack an account.

If you still need an email, have the web service create it

davbryn
  • 7,156
  • 2
  • 24
  • 47