![]() |
#1
|
|||
|
|||
![]() What is required to enable the synthesis server to sync emails?
We currently have contacts, events and tasks syncing from a database, based on your sample database structure. Our emails are stored as RFC 2822 format .eml files within a simple folder structure at the moment, but we can present them to other applications pretty much how we like. Regards, Charlie. |
#2
|
||||
|
||||
![]() First, it needs some config for the internal data representation: a <fieldlist> and a <datatype basetype="text"> (and, in the 3.x server, a <textprofile>). With this, email headers can be mapped to internal fields using <linemap>, similar to mapping properties to fields with <property> in vCard/vCal. The engine has everything built-in to parse and build RFC(2)822 messages, including attachments (see <mimemail>).
Then it needs a representation of the emails in a database. For E-Mail, this is usually not a SQL database. This can be solved by developing a custom database plugin in C/C++ or JAVA using our SDK. The main problem here is usually not the data format, but the difficulty to get persistent object IDs for emails in e.g. a IMAP datastore, and a reliable "last modified" timestamp. Third, unlike contacts and calendar, email sync is not symmetric and requires some special features like folders and "mark for download". What exactly is needed is dependent on the overall application, so that why the server has no built-in mechanisms for these email-related extras, but relies on the scripting capabilities. The email <datatype> usually contains <processitemscript> and <outgoingscript> which take the email inherent assymmetry into account (inbox on server never written etc.), and probably a <mergescript> to accomplish Mark-For-Download features. We're working on a tutorial document for the server which will (among other topics) contain a sample set-up for email datatype, that works with the email-capable clients currently around (the P8xx/9xx/M600 series, various Nokia devices and of course our PDA clients). In addition, once the new SyncML DS 1.2 features, especially hierachical sync, are more widely adopted, an email datastore implementation will also need to work with folders as real objects (not just tags to a message as it is now in SyncML 1.1 email implementations).
__________________
Lukas Zeller, plan44.ch |
![]() |
Thread Tools | |
Display Modes | |
|
|