Not to be confused with linux sendmail.

  1. apt-get install sendEmail
  1. Create a bash script "sendemail" and run chmod 755 on it.
#!/bin/sh

export smtpemailfrom=zabbix@yourdomain.com
export zabbixemailto=$1
export zabbixsubject=$2
export zabbixbody=$3
export smtpserver=yoursmtpserver.com
export smtplogin=smtpuser
export smtppass=smtppassword

#Use this line if your SMTP server requires authentication
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass

#User this line if your SMTP server does NOT require authentication
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25

To run the script

sendemail email@domain.com 'subject here' 'message here!!, cool'

Resources[-][--][++]