Re: folder listing
DINH Viet Hoa <[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <etPan.42483286.4b19508f.5a9e@utopia> |
Luke Ehresman wrote : > I have been reading through the libEtPan API and am a bit confused at the > interface provided. I hope someone can clarify some of my questions. > > 1) As a developer, how do I connect to a generic mail server. I want to > be able to have users conigure POP3, IMAP, etc. Is there a generic way to > connect to mail servers, or do I need to do it different for each one? > Specifically, my confusion on this issue comes from the example which uses > imap_mailstorage_init() to connect to an IMAP server. I have successfully > connected using this method, but I assume this would only connect to IMAP > servers. yes, but for POP3, you have pop3_mailstorage_init() you may have a look to the tests/ folder in libetpan package. the connection is specific for each kind of connection. For example, for a MH folder, you don't have to specify any server. > 2) What is the use of sessions? I would have thought that a session > would envelop a storage, but it seems that the storage data structure is > what I pass to all the functions in order to retrieve messages and > folders. How are sessions used in libEtPan? The use of session should be avoided in favor of mailfolder. mailfolder.h wrap all the API of mailsession. public access to session API is historical. In fact, mailstorage and mailfolder are both wrappers on mailsession. > 3) How do I get a listing of folders on an IMAP server? There are some > functions listed in the session driver, but they are all depricated, and I > have not found any reference to "lsub" in the etPan client, or in the > libEtPan documentation. When listing folder of a mail access, you want to get information that is dependant of the mail access, for example, for newsgroup, you want to get their description, for IMAP you want to know if you can select this folder or not, that's what these calls have been deprecated for IMAP, you should use the underlayer IMAP API. for etpan, you should have a look at etpan-ng instead of etpan. This is in etpan-ng/src/etpan-imap.[ch] -- DINH V. Hoa, "sinon je suis le meilleur ingénieur du monde" -- Arsunik [2]
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBCSDR67w+pfAWHa3MRAv5SAJ9Re3IIheHLpUDFv26h48ZLu9W1IgCfe/+H Cb1Q73gEd/s9M/r4fSw4mqs= =0CFd -----END PGP SIGNATURE-----