I'm pretty sure this is NOT possible, but I want to confirm...
I have various apps running on a handful of servers, and each of the apps
needs to send email at one point or another. I don't want the apps talking
SMTP directly. What I'd like is...when the apps need to send email, they
just queue the outbound email message to JMS (ActiveMQ). Then in one spot
where I *can* talk SMTP, I'd like to set up a route like:
from("activemq:queue:email.outbound")
.to("smtps:user@mailserver:port?...");
My understanding is that this will work ok as long as I'm sending plain
non-multipart email (i.e. no attachments). Just body and headers, and
that's it. Pretty sure that will work. But as far as I can tell, if I need
to add attachments, the JMS component will NOT propagate the attachments. I
can understand why...you can't serialize a DataHandler (right?), and it's
theoretically undesirable to have to *copy* full content from all attached
DataHandlers. The message could get unwieldy. Anyway, I looked at the
source for the JMS component, and it appears that JmsBinding doesn't even
look at attachments. Understandable.
Does all of this sound correct? Or am I missing some way to use JMS as a
go-between for sending multipart messages with attachments?
Thanks,
Dan