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

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

On Debian possible default full paths are:

/usr/bin/bsd-mailx - from package: bsd-mailx

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