I've written a shell script to use an external SMTP client to send authenticated email as follows:
#!/bin/bash
[email protected]
zabbixemailto=$1
zabbixsubject=$2
zabbixbody=$3
smtpserver=smtp.domain.com
[email protected]
smtppass=12345
/usr/bin/snedEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass
-------------------------------
The script is located in the alertscripts directory and it does indeed run but it never receives the variables $1, $2, $3 so the email is never sent. My question is where are the variables generated? I'm running Zabbix 2.0.11
#!/bin/bash
[email protected]
zabbixemailto=$1
zabbixsubject=$2
zabbixbody=$3
smtpserver=smtp.domain.com
[email protected]
smtppass=12345
/usr/bin/snedEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass
-------------------------------
The script is located in the alertscripts directory and it does indeed run but it never receives the variables $1, $2, $3 so the email is never sent. My question is where are the variables generated? I'm running Zabbix 2.0.11
Comment