[HowTo] Use mutt with msmtp

Mutt is a small but very powerful text-based mail client for Unix operating systems. Msmtp is a smtp client which is available for Linux as well as windows.
Configuring mutt to work with msmtp is fortunately quite easy. Here’s a tutorial teaching the same.
Step 1:
Find the executable path of msmtp:

which msmtp

Step 2:
Just open ~/.muttrc using a text editor and add the following code to it:

send2-hook '~f [email protected]' 'set sendmail="PATH"'

Replace PATH with the executable path of msmtp and replace [email protected] to the FROM address you want in your email address to appear. For me the code looks like the following (on Ubuntu 10.10):

send2-hook '~f [email protected]' 'set sendmail="/usr/bin/msmtp"'

Try sending a mail with mutt and it should succeed.


Leave a comment

Your email address will not be published.