1

I know that I can use MFMailComposeViewController and MFMailComposeViewControllerDelegate to pop up email composer template with my to/from/subject settings and user can edit these settings and click send button.

Reference links: How can I send mail from an iPhone application Iphone send email from application http://developer.apple.com/library/ios/#samplecode/MailComposer/Introduction/Intro.html

...but my requirements are different. I want to develop a form (user inquiry/feedback form) where user need not to special to/from address rather they input their details and click send button. For example, form given at http://www.connectjets.com/quote.html

Is there anyway such that the mail composer template won't pop up and I can send an email directly?

Thanks.

Community
  • 1
  • 1
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139

2 Answers2

1

Setup a PHP-Script that handles sending email. Present a form from within your app and then post that data to this PHP script using NSURLConnection. Then you don't need to use the mail composer...

Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
  • Thanks. I have never used PHP script. It would be great if you could provide some sample code. I am wondering why can't I directly do it from my application? Can't I add sending email code (that I suppose to put in PHP script) in my application on Send button click event? – Paresh Masani May 06 '11 at 15:18
  • If you don't know PHP and don't have a webserver to run this script on, try out a SMTP library like skpsmtpmessage (http://code.google.com/p/skpsmtpmessage/). It claims to provide this functionality – Björn Kaiser May 06 '11 at 15:21
1

I have tried the SMTP library skpsmtpmessage, but was unable to get it to send messages... I also investigated this issue fairly thoroughly, but it could not be done.

Can I send email programmatically in iPhone app?

Please let us know if you are successful with the PHP solution, it sounds like a good strategy. You should be able to then send the email server side.

Community
  • 1
  • 1
jcpennypincher
  • 3,970
  • 5
  • 31
  • 44
  • Well, I am not going to implement this in PHP as our environment is setup with ASP.NET MVC. I have another idea and gonna to give a try. I will send required information to my web server - Controller on Send button click event and from there I can send an email using .NET libraries. – Paresh Masani May 08 '11 at 11:34