How to send emails with msmtp on Windows or Linux or Mac OS X
Jacmoe | Jan 3, 2013 |
Sometimes you need to just be able to send emails, without having to install a full-fledged email server and/or use a dedicated library, like Swiftmailer or PHPMailer (assuming, of course, that you use PHP - otherwise insert your favorite email library here).
The send function in PHP uses sendmail (if it's installed) to send emails, and this blog post outlines a way to be able to do that by means of a small program which can emulate sendmail.
I wrote a blogpost previously about using fake sendmail for the same purpose, but msmtp (which is what we'll be using here) seems to be actively maintained, and it's in most package repositories for Linux, so a much better option IMO. ;)
And, like fake sendmail, it works in Windows too.


