This will rewrite mailer.conf so that it uses ssmtp instead of sendmail.
Then, you don't need to put the sendmail line in .muttrc.
However, as jbhappy correctly mentioned, it's /usr/local/sbin/ssmtp that you want.

I see that you also give the option to offer another solution. I've come to prefer msmtp. Firstly, ssmtp has been abandoned and is no longer maintained. Secondly, msmtp gives you a bit more flexibility--you can send from multiple accounts and such.

This will rewrite mailer.conf so that it uses ssmtp instead of sendmail.
Then, you don't need to put the sendmail line in .muttrc.
However, as jbhappy correctly mentioned, it's /usr/local/sbin/ssmtp that you want.

I see that you also give the option to offer another solution. I've come to prefer msmtp. Firstly, ssmtp has been abandoned and is no longer maintained. Secondly, msmtp gives you a bit more flexibility--you can send from multiple accounts and such.