Want to send mail without USing MFmailcomposer and without webservice - iphone

I have a task which is related to sending mail without connection or MFmailcomposer.
Simply i am doing work on a form which have to sent a single mail-id. when the form fills up and user perform the action for sending then sent mail to the client without MFmailcomposer and webservice if connection available else if Wi-fi is not available then filled form text file will save in documents directory.and when iPhone comes in connection then automatically it sent to that mail -id. document is saving as text file. but now what to do ?
Is SMTP is useful for it?
suggest me...

the below link could help you...
http://www.raddonline.com/blogs/geek-journal/iphone-sdk-testing-network-reachability/

You would definitely have to implement this functionality with SMTP.
Check the answer to this SO Post, Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
Includes several links to different SMTP Libraries, as well as example code.

Related

automatic background email from iphone application to users

I am so confused. My simple requirement is: i have an application which contains confirmation form i.e. nib file. It contains some textFields like name, age, email etc. I simply want when somebody click on submit button application send background and automatic email to email defined in textField. that email contain all information like name, age etc. User need not to fil anything and it should work in background. There are so many application do the same thing. I am creating booking application.
So how can i impliment this behaviour.
Apple does not provide a way to do this - and for good reason. Sending emails from the phone automatically introduces a lot of security risks.
I am willing to bet that the apps that do this use an intermediary server to which they post the data. When the data is posted then the server handles the sending of the emails.
To do this:
Send an HTTPS POST request to your server application.
From your server application, send an email via SMTP (or APIs built on top of SMTP).
Google AppEngine provides a simple and cheap way to create such a web service, running on top of Google's cloud-computing infrastructure. The sending mail from AppEngine help document includes detailed examples of how to send mail from your server application (assuming you use the Python version of Google AppEngine).
Unfortunately, there is no official feature for this but you could download a third-party library. Refer here for a couple of suggestions.

is it possible to send email with custom view instead of presentModalViewController

i need to send email in my application.
i know that this can be possible using MFMailComposeViewController.
But it popup presentModalViewController,I need to custom reception box,composer,subject like this.
simply by clicking send button i need to send email.
if it is possible can ant one please help me.
Thank u in advance.
For security and privacy reasons, Apple does not allow applications to send automatically email, and requires the user to review it and explicitly click on the Send button in order to do it.
If a regular app could present its own view to get the email data and send it, what's to stop a malicious app from sending spam emails on the user behalf to all his contacts?
Franci is right that Apple's frameworks do not allow this, but it can be done. You need to link in a custom SMTP framework to do it.
This is an example.
http://code.google.com/p/skpsmtpmessage/
I have not used that particular framework. Googling will probably provide many other options.
There's no background mail-sending class in Cocoa, but if you reallllly need to, you can build your own. A lot of mail servers will let you send mail anonymously. Read on up on the SMTP protocol, then pick a mail server and telnet into it and test it out. Then you can use network classes in Cocoa to follow the protocol programatically. It's a bit of a pain, but I've done it before.
Useful links:
NSStream
NSInpoutStream
NSOutputStream
SMTP protocol
To telnet into a server, pick a mail server, then in terminal, type telnet <server> 25 and press Enter. Then follow the protocol.

Can I send email programmatically in iPhone app?

I need to be able to send a pre-formatted email or SMS text message programmatically from within an iphone app. Can this be done? I have looked at apple's MFMailComposeViewController class, but this "provides a standard interface that manages the editing and sending an email message" and the MFMessageComposeViewController class also has it's own "standard system interface for composing SMS text messages". These allow you to present an interface to the user where they have to fill in all the data and then explicitly press a send button.
I cannot use this boilerplate functionality.
I need to be able to send a message without presenting any interface to the user. I know this sounds evil, but actually it is for a commercial application which needs to communicate to a user group in a central office when users in the field have performed specific actions out in the field.
Has anyone found a solution to this?
After much investigation, I have found that sending emails programmatically, without user intervention, from an iphone application, cannot be implemented using any of the apple frameworks.
Set up a web service you can post to using an HTTP request. If you are posting to only one address this can work very well, although you may want to get the user to input their return mail address.
Otherwise only the standard dialog is available (this relies on using whatever account they've setup on the device).
Here are a few SMTP API's that work on OS X. They might work on iOS as well.
Pantomime
MailCore
EdMessage
Only Possible via Web Interface, you can not hide the Interface , this is as per apple Guidlines to Developer and as per documentation
Looking for a solution to such a problem, I found something interesting here: How to send mail from iphone app without showing MFMailComposeViewController?
I hope this will be useful!
This is standard not possible. If you can't use the standard dialog you need to use SMTP.
SMS is the same, use the dialog of use a webbased sms service (most of these cost some money).
I have no experience with iOS, but I have enough experience with email protocols to say I'd be very surprised if a client application could send email without accessing a server. More than likely, the email will be sent using the SMTP protocol and therefore must be sent using an SMTP server. Choosing how you connect to that server is about the only option you have. You could connect to a server-side script (such as php) to generate and send the email, or you may be able to create a socket and connect directly to port 25 on the SMTP server and still generate the email from you client application.
Check out:
RFC 5321 at https://www.rfc-editor.org/rfc/rfc5321
SMTP on Wikipedia at http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
You could always do a low level telnet using SMTP protocol to a known mail server to send a message. I don't know if Apple will reject the app, but SMTP is damned simple.

Email from an app, but not use a a pop up controller, just text inside a text box

is there any way to send whats in a text view (im trying to make a suggestion box) to my email address?
example
user types in the box " I think you should add twitter support"
then that is sent in the background to my email address example#gmail.com
then a message is popped up on the screen saying "suggestion sent"
just an example of what i mean
Any ideas, tutorial links would be greatly appreciated guys
Thanks
You can do this in php, asp or many another server side programming language. Depends what your server supports?
Your form action would be a php file that would then process the info sent in the form.
http://php.net/manual/en/function.mail.php
You can always roll out your own SMTP client code if you don’t want to use the built-in mail composer. But such a solution is not perfect – you have to have an SMTP server (or use an open relay, yuck) and the device has to be online or you have to write some network queue. As for the SMTP client library, quick search returns skpsmtpmessage (no idea if it works at all).
P.S. Do you insist on sending the suggestion by e-mail? Sounds like a simple HTTP POST into a database would do just fine.

problem related email application

I want to send an email from my application whenever a user taps the SEND button of my view.I do not want to show the email interface to the user.All the fields needed for email will we filled via my application.So is there anyway to do this???
There is a project on Google Code called skpsmtpmessage which will allow you to send off a faceless email.
Alternatively you could have a look at the Pantomime package. It also contains implementations of the SMTP protocol. It has however not (yet) been ported to iPhone AFAIK, but since it's written in Cocoa it should not be that big a task for doing this specifically for the SMTP part..