Send an email from the command line

You can use the mail command. I believe it relies on sendmail by default.

echo -e "message body" | mail -s "message subject" email_address

Last modified: 07/05/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top