>> Perhaps provide a “default” MailAdapter? In that case, then the factory 
>> could even just take an email and a SieveScript InputStream and apply the 
>> default MailAdapter. The method with the MailAdapter signature would only be 
>> needed for custom MailAdapters.
> 
> JSIEVE (core) don't depend on "mailet-api". For the sake of minimalist
> dependencies, I am not sure this is a dependency we want to add. We will
> have to "adapt" things all the time then.

Yeah, it is indeed better to reduce compile-time dependencies as much as 
possible for sure!

Then again, the Sieve spec appears to be dependent on “valid” emails, which are 
represented by javax.mail.Message.

On that note… what is the canonical representation of an email in the James 
ecosystem? I am guessing that there has to be some kind of lingua franca 
representation of this core concept, no? Is it javax.mail.Message (which would 
be a reasonable assumption, and known to all components of the ecosystem)? Of 
course, it’s ok to have a projection of an email for each component, 
represented by a different class.

If javax.mail.Message (I’ll just write j.m.M to save my hands a little writing) 
is used by all components, and any specialized representation is expected to 
have a from(j.m.M) and toMessage() method (for example), then it would be 
trivial to communicate an email between the different components without 
creating any dependency other than javax.mail.

If jSieve could accept a javax.mail.Message, then the default adapter would 
work.


Cheers,
=David


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to