iPhone - E-Mail APIs
I've seen some custom libraries for sending e-mails, but are there any ava开发者_StackOverflowilable for receiving them? I know of numerous ones that are available for the mac, but not for the iPhone - and I mean, MobileMail.app must do it somehow :P
Has anyone got any ideas on this?
You can port most any POP or IMAP client code that can run inside a single process... however an app on a stock OS device is sandboxed off from the email credentials that a user enters in the Settings app, so an app will have to ask for its own email login credentials and do its own email protocol handling.
Apple also seems to reserve the right to reject apps that merely duplicate the built-in Mail app.
I'm a little confused as to what you're trying to achieve. DO you mean that you want the app to accept SMTP traffic and act as an MTA - ie receive mail? Or did you merely want to connect to an MTA and operate on the messages stored elsewhere.
If the latter then Hotpaws's answer is a good one.
If the former then your bigger problems are going to be in terms of maintaining MX records. Perhaps a mediated service in which you have a store and forward MTA on a static IP that forwards on connection to the app. MTAs should still support this as that's how MTAs used to operate back when entire domains were connected via occasional dial-up.
Wow - I'm old.
精彩评论