How to use SSL for SMTP from a client/software that does not support it

I’ve seen many printers or programs that will automatically generate email messages on some events, but are only able to use SMTP over a non-SSL connection.
To solve this, you can use this great tool: stunnel (kudos for it’s developers!)