Skip to content

Instantly share code, notes, and snippets.

@wh13371
Last active September 18, 2019 16:38
Show Gist options
  • Save wh13371/23d08e689f64fbe16be0ffb0a140a27e to your computer and use it in GitHub Desktop.
Save wh13371/23d08e689f64fbe16be0ffb0a140a27e to your computer and use it in GitHub Desktop.
CentOS - Install Mail

install mailx

yum -y update
yum install -y mailx

create a symbolic link

ln -s /bin/mailx /bin/email

set SMTP Server

vi /etc/mail.rc

edit

set smtp=<SMTP_SERVER:PORT>

example:

echo "Your message" | mail -v -s "Message Subject" email@address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment