On Thu, Feb 28, 2008 at 9:55 AM, Lars Heinemann
<[EMAIL PROTECTED]> wrote:
> Guillaume,
>
>  I am wondering why camel isn't using attachments in
>  their messages. There are several cases when they would
>  normally need this feature. (polling per ftp, email etc..)

I agree there may be something missing in camel right now.
Maybe we should look at enhancing it ...

>
>  For the marshaller logic:
>  Yes, I have done it like this. It is almost the same logic used in
>  the lightweight email component. I think this will fit our needs.

Cool

>  Now the question is how to best implement this templating logic for
>  sending emails.

Good question !  This is really one of the thing I'm not found of in JBI.
Normalizing on the edges impose best practices, but in such use case,
this means that the templating logic has to be put in the BC, which seems
a bit weird to me.

A first solution would be to write several specialized marshallers, one for
each templating strategy ?

Anyway, a work around solution would be to have templating SE (transformation
engines) that transform an exchange and put the result in an attachment possibly
using a reference from the xml to specify the id of the attachement.
The mail BC
would then grab this attachment and use it as the main body of the mail.


>  Another question is if it is really necessary to have the spring mail
>  sending
>  ability in this component. What is the advantage to normal JavaMail sending?

There's none really.  Spring just add a small layer to ease the use and
avoid common mistakes I think.    I don't think there is a real need for both,
so if you have already implemented it using pure JavaMail, it should be
enough.

>  Any other ideas to improve the component are very welcome.
>
>
>
>  Regards,
>  Lars
>
>
>
>
>  Guillaume Nodet schrieb:
>  > Yeah, true, this may not be the best option then.
>  > Anyway, do you plan to use some kind of marshalers as in the components, 
> http
>  > or jms components so that the conversion mail<->jbi can be changed by the 
> user
>  > when needed ?
>  >
>  > On Wed, Feb 27, 2008 at 8:37 AM, Lars Heinemann
>  > <[EMAIL PROTECTED]> wrote:
>  >
>  >> Guillaume,
>  >>
>  >>  unfortunately the Camel message structure does not support any kind of
>  >>  attachment and therefore it's useless for this case. The alternative
>  >>  would be
>  >>  to add attachment support to Camel messages.
>  >>
>  >>  Regards,
>  >>  Lars
>  >>
>  >>
>  >>
>  >>
>  >>  Guillaume Nodet schrieb:
>  >>
>  >>
>  >>
>  >>> Great, we've needed that for a long time now :-)
>  >>>
>  >>  > AFAIK, the spring mail support uses the Javamail api.  Is there 
> anything that
>  >>  > the endpoint based on spring could not do wrt to the other one ?
>  >>  >
>  >>  > Also wrt to velocity and other templating frameworks, it might we worth
>  >>  > having a look at camel.  I would even consider using camel mail support
>  >>  > (http://activemq.apache.org/camel/mail.html) directly, because camel 
> already
>  >>  > support templating: http://cwiki.apache.org/CAMEL/templating.html
>  >>  >
>  >>  > Given that camel supports JBI, we could consider mail endpoints using 
> a camel
>  >>  > route:
>  >>  >    from("jbi:xxx").
>  >>  >       to("velocity:com/acme/MyResponse.vm").
>  >>  >       to("smtp://host:port/")
>  >>  >
>  >>  > Just some thoughts....
>  >>  >
>  >>  > On Tue, Feb 26, 2008 at 10:04 PM, lhe77 <[EMAIL PROTECTED]> wrote:
>  >>  >
>  >>  >>  Hi,
>  >>  >>
>  >>  >>  actually I am developing a JBI compliant binding component for 
> polling and
>  >>  >>  sending emails.
>  >>  >>  I will start here a discussion to put together all ideas and 
> requirements
>  >>  >>  for this BC. So any
>  >>  >>  suggestion is welcome.
>  >>  >>
>  >>  >>  State:
>  >>  >>  - The BC uses the JavaMail API to poll and send emails. (2 endpoints 
> for
>  >>  >>  now)
>  >>  >>
>  >>  >>  ToDo:
>  >>  >>  - Sending mails via spring mail. (via another endpoint)
>  >>  >>  - integrate frameworks like Velocity for email template handling
>  >>  >>
>  >>  >>  Regards,
>  >>  >>  Lars
>  >>  >>
>  >>  >>  --
>  >>  >>  View this message in context: 
> http://www.nabble.com/new-JBI-componten%3A-EMail-BC---Discussion-thread--tp15699972s12049p15699972.html
>  >>  >>  Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>
>  >
>  >
>  >
>  >
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to