i am creating an app when a user clicks contactUS button a UIAlertview will appear where it consists of name , email textfield , when user clicks send UIButton , i should get an email saying user wants to contact me and user should receive a email saying thank you for the email . I want to know how to do it ,any help would be helpful .
i am creating an app when a user clicks contactUS button a UIAlertview will appear where it consists of name , email textfield , when user clicks send UIButton , i should get an email saying user wants to contact me and user should receive a email saying thank you for the email . I want to know how to do it ,any help would be helpful .
If you want to send email in your application without writing a ton of code, the only solution I'm aware of is Apple's MFMailComposeViewController class. You pass it a from, subject, and body, as HTML strings, and it displays a compose mail form to the user. The user then clicks send and the mail is sent out.
I don't know of a way to send email without displaying an Apple mail form to the user.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
If you want to send email in your application without writing a ton of code, the only solution I'm aware of is Apple's MFMailComposeViewController class. You pass it a from, subject, and body, as HTML strings, and it displays a compose mail form to the user. The user then clicks send and the mail is sent out.
I don't know of a way to send email without displaying an Apple mail form to the user.
is this MFMailCompseViewController class you are talking about Loading
but i want two emails to be send with different body and subject ..the user will get confirmation email and whereas i get his name ,email info so that i could contact him
is this MFMailCompseViewController class you are talking about Loading…
but i want two emails to be send with different body and subject ..the user will get confirmation email and whereas i get his name ,email info so that i could contact him
That sentence doesn't make much sense. Can you state what you want to do in clear, coherent sentences?
If you want to send an email to multiple addresses, that's easy.
If you want to send two different emails, you have to display two different compose mail windows. No way around it that I know of if you want to use Apple's frameworks. Otherwise you have a massive amount of code to write to do your own mail handling, or link to a server that does the work for you.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
i am creating an app when a user clicks contactUS button a UIAlertview will appear where it consists of name , email textfield , when user clicks send UIButton , i should get an email saying user wants to contact me and user should receive a email saying thank you for the email . I want to know how to do it ,any help would be helpful .
The "thank you for the email" email should come from you, once you receive it. Don't send that locally, it would imply that you got it when you didn't. Plus, if you send email from the user's device, it would be sent from their email address, which you don't want.
You can set up the Apple mail client to auto-reply to emails. That's the zero-cost way to do it.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
The "thank you for the email" email should come from you, once you receive it. Don't send that locally, it would imply that you got it when you didn't. Plus, if you send email from the user's device, it would be sent from their email address, which you don't want.
You can set up the Apple mail client to auto-reply to emails. That's the zero-cost way to do it.
how to set up auto reply to emails ? where should i implement it ? can u help me on that ..
how to set up auto reply to emails ? where should i implement it ? can u help me on that ..
Go into the Apple mail application. Go to preferences. Click on rules. Create a new rule. Set it up to match on the subject/body of the message you send. (Make sure your app tells users not to change the mail subject, or create a mailbox that is only used for these mails.)
In the "Perform the following action" popup, select "Reply to message" and configure as desired.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Go into the Apple mail application. Go to preferences. Click on rules. Create a new rule. Set it up to match on the subject/body of the message you send. (Make sure your app tells users not to change the mail subject, or create a mailbox that is only used for these mails.)
In the "Perform the following action" popup, select "Reply to message" and configure as desired.
If you asking how to send email from within your app and select sender and recipient its very simple.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Won't that code launch the mail client and display the mail you've composed, rather than sending the email from within the app?
i downloaded the apple mail application code, i tried to send a message to my email ,i havent received it ..does the app work only when it is loaded on the device or should i do something else like network check
I want to change few things in code where i'll be adding name textfield,email id textfield ,so when the user sends me email ,in the email his name and his email id should be displayed ,can u help me in these two points
Last edited by raptor85; 01-03-2012 at 02:12 AM.
Reason: changes
i downloaded the apple mail application code, i tried to send a message to my email ,i havent received it ..does the app work only when it is loaded on the device or should i do something else like network check
I want to change few things in code where i'll be adding name textfield,email id textfield ,so when the user sends me email ,in the email his name and his email id should be displayed ,can u help me in these two points
Yes, I believe it only works on the device, not the simulator.
I don't know what you mean by "i downloaded the apple mail application code". What code?
Take a look at the MFMailComposeViewController class I suggested at first. That's what you need to do.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
i looked at MFMailComposeViewController class , it was available for download ,i tried to run it and the email didnt go through
The MFMailComposeViewController class is built into the SDK. There's no downloading it. You just use it in your project.
You can't use it from the simulator. You have to run it on the device. It works perfectly. That is how you should send email from your application. Really, truly.
If it doesn't work, you need to fix your code.
We have 3 apps in the app store that all use that class to send email, and they support iOS 3.1 and later. (Actually I think we've moved up to 3.2 and later now.)
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
The MFMailComposeViewController class is built into the SDK. There's no downloading it. You just use it in your project.
You can't use it from the simulator. You have to run it on the device. It works perfectly. That is how you should send email from your application. Really, truly.
If it doesn't work, you need to fix your code.
We have 3 apps in the app store that all use that class to send email, and they support iOS 3.1 and later. (Actually I think we've moved up to 3.2 and later now.)
Thanks Duncan i'll work on it and let you if i find any difficulty in solving the