Re: mail-in db/app
Re: mail-in db/app
- Subject: Re: mail-in db/app
- From: René v Amerongen <email@hidden>
- Date: Tue, 2 Oct 2007 10:31:04 +0200
Op 2-okt-2007, om 10:01 heeft Uli Kusterer het volgende geschreven:
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.
Text and url pointers to get extra information about where to get
blobs ( also in an separated thirt thread ). But the url's are of
course just text.
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.
Hmmm, maybe I could use a part of it. I will check the licence.
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).
I just did buy an older version of 'core macosx and unix'. I have
something to read.
One Cocoa-specific trick: After you've opened the socket, create
an NSFileHandle for your connection.
I remember something about that. I did read this somewhere to.
Thanks for mention this.
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,
I did prepare that already, but I dont know why, but I have scary
feelings about how to pass through the handle or socket to another
thread to follow the input and output stream, like in the image at
http://krum.rz.uni-mannheim.de/inet-2003/ -=> sockets -=> Pic. E
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.
I will search for them
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
Thank you
René_______________________________________________
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