Sending email-Iphone simulator - iphone

I've create an application where the user is able to send some info to others via email. But how could i test this on simulator? Is there any way to do that?

It is not possible to send emails from the Simulator. You need to test this on a real device (iPhone/iPod touch).

You cannot send mails through Simulator. Instead you can install the application in device and try from there.
Simulator just displays the composer but wont allow you to send mails. Sent Successfully is just the acknowledgment that your code is fine and there is no issue that terminates it while sending.

Its not possible to send emails using simulator.
You need a real device to check it.
the notitification of message sent is just to tell user that the code is proper.

Related

MFMailComposeViewController is this supposed to actually sendmail from the simulator?

I am working with MFMailComposeViewController and all seems good. The class indicates the mail was sent, but I have never setup email on the simulator and don't know how. So if its sent, what email server did it send it to?
The [mailClass canSendMail] also returns YES so it thinks its all ok.
Does anyone know how to setup the simulator for testing this 100%
No, the simulator does not actually support email accounts or allow you to really send mail.
[MFMailComposeViewController canSendMail] returns YES to allow you to fully test your mail generation and compose code paths. As far as your app should be concerned, it behaves exactly like a real device (since the user can choose to cancel out anyways on the real thing), although you cannot inspect the actual contents of the resulting email without testing on a real device.

How to send via my iphone application a planned emails and without launching the email application?

I know how to send email from my application by launching the iPhone Mail application, then return to my app. But I have two concerns:
1 / My first concern is how my application can send emails without opening the mail application?
So I will inform the user that the email has been sent successfully or failure on failure of transmission.
2 / My second concern is to make sending mail programmed (in scheduled task) as in the case of UILocalNotification.
I have not found a solution, I try to avoid knowing the solution that uses open source classes for sending mail via SMTP, because I want my application uses the configuration of the iphone and mail ask the user to configure where the mail is not configured.
Thank you in advance for your help.
You can send mail from your app using MFMailComposeViewController.
http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html
You can use MailCore or similar alternatives.
You cannot do that with your app in the background. It's not the same as UILocalNotification as it requires user's approval before the app can do anything about that notification.

mail could not send through iphone sdk?

i want to send mail through iphone sdk i know there are lots of answers here on stack overflow but it does not work ,i downloaded the mail composer app from apple site and ran in my simulator ,it displaye that mail has been sent but i dont get it on my email address
YOU CANNOT send mails through simulator. It just shows mail sent for the acknowledgement that your mail code is working and wont crash or have any errors..
For testing you have to use device. SIMULATOR shows you the composer but will never send mail as the mailclient is not installed in it..
hAPPY cODING...
You cannot test mail and message compose controllers in simulator. Mail composer uses the default mail account set up on your device to send the mail. There is no mail account set up in the simulator.
Test it on device...

Inapp email stuck in outbox using MFMailCompose

I'm using the MFMailCompose method to do an inApp email and everything works fine. I sent the app out to have it tested and here is the response from my beta tester.
My phone is a 3gs 32Gb, OS3.1.3
Tested at home over wifi, send works with no problems, tested twice.
Tested again over 3g, send still does not occur until I open my mail box, error still pops up.
Has anyone come across this? His problem seems to be only when trying to send via 3g. It works for me but I'm with a difference carrier. It has to be a settings, but we checked everything. Has anyone come across this?
If it works over Wi-Fi and not over 3G, then it's most likely because his device is set to send mail through an outgoing mail server (SMTP server) that restricts connections based on the network you are connected to.
For example, if you have broadband service through FooBarNet, they might tell you to use an outgoing mail server smtp.foobar.net. If you connect to that network while you're at home, the server will allow you to send mail. But if you try to connect to it from another network (e.g., your cellular phone's data network) it will reject the connection, assuming you are trying to hijack its mail server to send spam.
In other words, this has nothing to do with your app. You can verify this by using the Mail app to send mail directly.

Sending and receiving sms in backend of iPhone

I am new to iPhone application development. In the application that I am developing for iPhone there is a module which sends the sms without knowing to the user to my sms server and gets the response and displays the result. Is there any way to send and receive sms message in app?
Thanks in advance.
You should use data instead of SMS.
SMS are not a way to send information between a client and a server, but Internet is. And by using data, you also get a much more reliable transfer protocol (SMS aren't).
You shouldn't send SMS without the agreement of your users, because it can become really costly. Imagine you have a user on vacation in another country, and think that your app is using wifi, while it is using SMS. This user will be really mad when he will get is cellphone bill.
So even if you can do it, I think you shouldn't. And if you really need to do this, be sure that it is really clear to the user that your app is going to send SMS from his phone (with the charge of a normal SMS).
This is not possible with the iPhone SDK as it stands. It's probably not possible with any mobile platform without the user knowing about it as it's an obvious security hole.
I am also working on GPS-based application and I can have the device stop sending SMS back to the user every time the user send an SMS command. I think as long as the SMS is sent, it should be fine.
If the user wants to see the status of the device, then I might have to establish communication between my server and the device via TCP/UDP and have the iPhone app "parse" the information and display the status. Perhaps the best way is to have the server respond to the iPhone app saying "The device received your SMS command" and display it on the app so that the user knows his/her SMS were sent.
But yes, if we could get the location via SMS, then I could send those coordinates to the Google Maps app in the iPhone itself and it would display it for you.
I am the author of an App on Android which does this, called ImHerePlus. Check it out and see if it helps.