esmtp: 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/esmtp - from package: esmtp

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

On Debian possible default full paths are:

/usr/bin/esmtp - from package: esmtp

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