3

I want to create an app that have 5 textfield and a textView:

1 - Name
2 - Surname
3 - Telephone
4 - "your email" (user email, not address email receiver)
5 - city
6 - textView (for body mail)

So, when I filled all textView I want to send this message at an address mail that is set in the code.

I'll compose mail as this example:

mail from: "name" "surmane"
email: "yuor email"
telephone: "telephone"
city: "city"
bosy: "textview content""

But it's not my problem; my problem is that I don't want to use app mail iphone, but I want that when I push a button "send", I want to show just an alertView that say "email sent"; is it possible ?

cyberlobe
  • 1,783
  • 1
  • 18
  • 30
cyclingIsBetter
  • 17,447
  • 50
  • 156
  • 241

3 Answers3

2

This should work

MFMailComposeViewController *mailSendingController = [MFMailComposeViewController new];

[mailSendingController setSubject:@"Feedback"];
[mailSendingController setToRecipients:[NSArray arrayWithObject:@"feedback@us.com"]];
[mailSendingController setMessageBody:myText isHTML:NO];

mailSendingController.mailComposeDelegate = self;

[self presentModalViewController:mailSendingController animated:YES];

where myText is a string that you make with your info

Jordan
  • 1,564
  • 2
  • 13
  • 32
0

This could be done by sending the data to a server and sending it from there. I dont see a way of sending it directly from the device without using the mail app.

MaikelS
  • 1,309
  • 4
  • 16
  • 33
  • No dude, you solve this by creating a webservice like hiren said. Send some data to a php server for example through POST, and fill in the blanks. – MaikelS Dec 22 '11 at 11:04
0

for this you have to create webservice. because without this the only option is inbuilt mail method of ios

Hiren
  • 12,720
  • 7
  • 52
  • 72