top of page
Set Email in Linux
Download
1. Download mailx
$ yum install mailx
2. Configure SMTP client
$ vim /etc/mail.rc
set smtp=mail.softsolvers.com.my:587
set smtp-auth=login
set smtp-auth-user=serveradmin@gmail.com
set smtp-auth-password=password
set ssl-verify=ignore
3. Sent email
$ echo "Your message" | mail -v -s "EMAIL_TITLE" -S from=emailFrom emailTo
Done.
Script use
cat /tmp/thisislog.log | mail -v -s "EMAIL_TITLE" -S from=emailFrom emailTo
bottom of page