= EmailDeveloping = == URIS of e-mails == === dumb emai:scheme === E-mails can be identified using the uri scheme email:. === complicated but correct IMAP scheme === The uri scheme for IMAP e-mails is defined in RFC 2192 * http://www.networksorcery.com/enp/rfc/rfc2192.txt some examples: * imap://michael@minbari.org/users.*;type=list * imap://sauermann@example.com/INBOX/ - a folder * imap://sauermann@example.com/INBOX/;UID=234 - an e-mail * imap://sauermann@example.com/INBOX/;UID=234/;SECTION=1.1 - a mime-part within an e-mail Code to create uris: * https://gnowsis.opendfki.de/browser/trunk/gnowsis_email/WEB-INF/src/org/gnowsis/email/config/StoreConfig.java Code to parse uris: * https://gnowsis.opendfki.de/browser/trunk/gnowsis_email/WEB-INF/src/org/gnowsis/email/config/UrlParser.java '''Troubles''': If we Use IMAP URIS, then we have a lot of trouble: The IMAP Uris seem to be UTF7-IMAP encoded, a weird encoding scheme for that purpose. Only I cannot get the corresponding decoder to run, it is the XPCOM class @mozilla.org/intl/unicode/decoder;1?charset=x-imap4-modified-utf7 In Java, the specified encoding seems not to be available. In PHP it is, called imap_utf7_encode(). also, it is not deterministic how this thing works, the same string can have two different UTF7-IMAP representations. Test: Böser & enc1: B&lA-ser &- enc2: B&APY-ser &-