Thankfully, I find fewer project stakeholders insisting that I transfer data via email these days, than I did in the past. It seems the IT world has finally embraced the power of API’s and the many other, more sensible, integration tools available today.

However, we still live in a world  where many human operators prefer communication via email. As such, I often encounter use-cases where a notification or some such message needs to be escalated to a team’s collective email address.

There are many tutorials out there to get you started on using Mule’s SMTP Connector. This straightforward connector will demonstrate how you access a mail server and send an email with little more than a simple configuration of the connector itself….

And then you will encounter the real world where mail servers insist on enforcing security features like TLS. This is where many of the tutorials seem to come up short.

 

Sending Email in the Real World

 

So it happened, when my client asked me to forward notifications on to their shiny new mail server which enforced TLS. This shouldn’t be unusual; any mail server worth its salt would do this. And yet…

Unlike many other MuleSoft connectors that have form-based TLS features that are easy to configure, the Mule 4 SMTP connector did not appear to offer any out-of-the-box feature to achieve this. Even more confusing, was the fact that previous versions of this connector (Mule 3.x) appear to have supported this. So why would the product regress in this respect?

I whispered…

… and Mule delivered!

  

All it required was a single property added under the Advanced tab of the SMTP Connector Configuration component.

Key: mail.smtp.starttls.enable

Value: true

 

Nothing difficult about it, other than the fact that it was not documented anywhere at time of writing.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>