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"

With php

php -r "mail('', 'message subject', 'message body');"

Last modified: 10/11/2015 Tags:

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