Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mutt: Error sending message, child exited 127 (Exec error.)

Tags:

unix

email

mutt

I have to send a mail with an attachment from a shell script. I am trying to do it using mutt as shown here: How do I send a file as an email attachment using Linux command line?

Command: echo "This is the message body" | mutt -a "/path/to/file.to.attach" -s "subject of message" -- [email protected]

Error:

Error sending message, child exited 127 (Exec error.).
Could not send the message.

like image 344
Aditya Avatar asked Apr 15 '16 05:04

Aditya


1 Answers

I was having the same issue on Ubuntu 18.04 and just like @jono, I only had installed mutt. Installing

sudo apt-get install sendmail

After that, sending mail with the test method or straight through the mutt CLI worked perfectly.

like image 75
Valentin M Avatar answered Sep 18 '22 05:09

Valentin M