0

I have to send an email in one of the application,i have implement MFMailComposeViewController and everything is working fine, mail can be send and received also.

However my main issue is that, is it possible to send mail without opening the Sheet of MFMailComposeViewController ?

Means in my application I have to pass on url into suject field and have to type the recepients name in textfield, so is it that we cannot open the sheet of messagecontroller window and send the mail from the uibarbutton integration?

plz let me know that

V.V
  • 3,082
  • 7
  • 49
  • 83

2 Answers2

0

If you dont want to use MFMailComposer, you may use following code.You have to handle you textfield's mail id's through string manipulation and append it in mString before body.you may use UItextview for body.

NSString *mString = @"mailto:foo@example.com?cc=bar@example.com&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!";
NSString *url = [NSString stringWithString:mString];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
  • According to the information if we implement that it may work, what about multiple user, to send email –  Apr 22 '11 at 10:22
  • did you provide as :mailto:foo@example.com,some@gmail.com...." and check? if it is not working use http://code.google.com/p/skpsmtpmessage/ –  Apr 22 '11 at 11:22
0

To prevent spam from using the user mailbox, application cannot send mail automatically. THe user will have to press "Send" themselves. This way, they know what e-mail is going out.

If you want your app to automatically send mail, you will have to setup your own SMTP client/server.

Black Frog
  • 11,595
  • 1
  • 35
  • 66