msmtp: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/msmtp - from package: msmtp

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/msmtp - from package: msmtp-gnome
/usr/bin/msmtp - from package: msmtp

You may install the required package with command apt-get install {package}
Error in other languages:
msmtp: bevel nie gevind nie
msmtp: comandă negăsită
msmtp: comando não encontrado
msmtp: commande introuvable
msmtp: command not found
msmtp: käsku ei ole
msmtp: không tìm thấy lệnh
msmtp: komanda nerasta
msmtp: Kommando nicht gefunden.
msmtp: kommandot finns inte
msmtp: komut yok
msmtp: nie znaleziono polecenia
msmtp: níor aimsíodh an t-ordú
msmtp: no se encontró la orden
msmtp: no s'ha trobat l'ordre
msmtp: opdracht niet gevonden
msmtp: parancs nem található
msmtp: perintah tidak ditemukan
msmtp: príkaz nenájdený
msmtp: příkaz nenalezen
msmtp: команда не найдена
msmtp: командата не е открита
msmtp: 命令找不到
msmtp: コマンドが見つかりません