tags:

views:

42

answers:

2

In iPhone programming, there are two ways to send mail. 1. openURL 2. In-App mail using messageUI framework.

Using second approach - in-app mail, it will show a view with to address, subject and body of message. Then it will have "Send" and "Cancel" buttons. On click of send button, message will be sent and then it will come back to app.

Now my question is that, is there any possiblity to send mail automatically without showing the view and clicking "send" button?

Because, I want to send 10 custom messages to 10 different email id's one after another. Possible or not?

+1  A: 

No, I am sorry. This is not possible. The message sender interface forces you to allow the user a cancel or send option - this is to prevent apps spamming with the user's account.

Hope this helps, Christian Stewart

Christian Stewart
This is however if you only wanted to use the messageUI framework. You may be able to use other methods to achieve this, including but not limited to PHP scripts with the sendmail() function implemented running on your web server. You could call these with NSURL and NS whatnots for the connections the the HTTP page.
Christian Stewart
+1  A: 

You will have to build-in your own mail agent code to connect to a mail server, and have the user enter all necessary account credentials into your app (or have your own account built-in).

hotpaw2