Sending outbound SMTP messages through Gmail with Mule ESB
Join the DZone community and get the full member experience.Join For Free
I'm currently working on a Managed File Transfer (MFT) proof-of-concept for a client using Mule ESB Enterprise.
One of the requirements I had to address is the ability to send SMTP
email messages when a particular connector failed, i.e. SFTP connection
failed. I thought to myself, that's a reasonable request and something
that is probably straightforward to do in Mule ESB. Well, if you look
at the Mule configuration it is straightforward however, getting to that
point using Gmail took some work...so I thought I'd share :)
What you need...
- Mule ESB (I'm using Mule ESB Enterprise Version: 2.2.5 Build: 16813 along with Mule Management Console support, i.e. mmc-agent-2.2.5.jar) *
- A test Gmail account
<description>Test configuration to send SMTP email through Gmail.</description>
<!-- Configure some properties to work with GMail's SMTP -->
<smtp:gmail-connector name="emailConnector" />
subject="Test email message"/>
Opinions expressed by DZone contributors are their own.