• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mail-in db/app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail-in db/app


  • Subject: Re: mail-in db/app
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 2 Oct 2007 10:01:45 +0200

Am 01.10.2007 um 20:48 schrieb René v Amerongen:
Just POP3.

POP3 itself is pretty easy. It's a protocol that was designed to be typed in manually by humans, and hence, it's pretty easy to just look at the POP3 RFC documentation and write your app to send/receive the command. The thing where it becomes difficult is parsing the actual messages themselves: The RFC 822 message format and its extensions (MIME etc.) are quite involved, and if you want to handle all that correctly, you'll have a bunch of work ahead of you. If you want to also handle all messages that some of the less standards-compliant mail clients may throw at you, you'll have even more work.


For cocoa, I did found only pantomine, and that's to heavy.

Well, it's intended to be used for cloning an application like Mail.app, and last I checked, PantoMIME was very lightweight if you considered that.


I was also looking for a blog or article about this subject.

Well, I only know a German page from Mannheim University:

	http://krum.rz.uni-mannheim.de/inet-2003/

And that only demonstrates SMTP. But as I said, the protocol was designed for humans. Generally you send a line, get a line (or several). The RFCs are also pretty nicely written.

Like firewall issues, sockets e.t.c. Just to get better and more informed.

Well, sockets are a Unix standard thing, so you can probably get a good book on Unix sockets and that'll inform you much more than anyone here can. There's not much Firewall stuff you should have to do: Your application is making an outgoing connection, and the server should have the right ports open. It should Jsut Wrok(tm).


One Cocoa-specific trick: After you've opened the socket, create an NSFileHandle for your connection. That makes reading/writing much more convenient. I just wrote myself wrappers for line-wise reading of ASCII strings and put them in an object of my own that owns the NSFileHandle. Worked beautifully. Also, keep in mind to do all this stuff on a second thread, so the user can use the GUI even while you're downloading e-mail.

That said, there's a couple of URL connection and socket classes out there that might also be handy.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Sockets or NSStreams (was Re: mail-in db/app)?
      • From: Marcelo Alves <email@hidden>
    • Re: mail-in db/app
      • From: René v Amerongen <email@hidden>
References: 
 >mail-in db/app (From: René v Amerongen <email@hidden>)
 >Re: mail-in db/app (From: "I. Savant" <email@hidden>)
 >Re: mail-in db/app (From: René v Amerongen <email@hidden>)

  • Prev by Date: Re: How can we draw a NSWindow in a custom NSView?
  • Next by Date: Re: mail-in db/app
  • Previous by thread: Re: mail-in db/app
  • Next by thread: Re: mail-in db/app
  • Index(es):
    • Date
    • Thread