Sankar Chandra Bose
Sankar Chandra Bose

Reputation: 377

Sending Mail using MFMailComposeViewController in iPhone

I have a situation where i need to send details entered in the UITextfields to the administrator's mail ID without opening the MFMailComposeViewController.

This is a registration part of the application,so i will ask the users to enter their personal information like name,mail ID,DOB etc.,and i want to send these information as a mail to a hard coded ID which is the administrators mail ID.

I want this mail to be sent when the register button is pressed which is kept at the bottom of the same page.

I used the MFMailComposeViewController,without displaying the Composer view by avoiding the usage of this statement in order to prevent the modal view being popped up when i hit the register button

[self presentModalViewController:picker animated:YES];
and i use the

 - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
by invoking it using the statement

[self mailComposeController:picker didFinishWithResult:MFMailComposeResultSent error:nil];

where picker is the object of the

MFMailComposeViewController

What should i do,to implement the same?

Kindly anybody advise me on how to achieve this.

Thanks a lot to everyone.

Upvotes: 0

Views: 502

Answers (1)

Felix
Felix

Reputation: 35394

Thats not possible with MessageUI.framework. Instead you could set up a web service which sends the mail. Your app would connect to your server and sends the mail from there.

Upvotes: 1

Related Questions