msmtp command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
msmtp: command not found
or when using sudo you get the following error message
sudo: msmtp: command not found
Solutions to msmtp: command not found
How To Fix msmtp: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu msmtp is provided by msmtp package.
msmtp is:
msmtp is an SMTP client that can be used to send mails from Mutt and probably other MUAs (mail user agents). It forwards mails to an SMTP server (for example at a free mail provider), which takes care of the final delivery. Using profiles, it can be easily configured to use different SMTP servers with different configurations, which makes it ideal for mobile clients.
To fix this problem, we can install more using the command below.
sudo apt-get -y install msmtp
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install msmtp.
sudo apt -y install msmtp
Or if you have aptitude installed you can use the following command.
sudo aptitude install msmtp
Summary
In this tutorial we learn how to fix msmtp command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.