Hi Team,
please help me to set up email notification handler
Hi Team,
please help me to set up email notification handler
getting error validating input: missing destination email addressError
My handler is
sensuctl handler create email-handler \
--type pipe \
--command "sensu-email-handler -f frommail@gmail.com -t tomail@gmail.com -s smtp.gmail.com -i 25" \
--runtime-assets sensu-email-handler
Hi @sagar.reddy,
Did you happen to take a look over the example in the README? Your command doesn’t seem to have all the requisite values, especially considering that you’re using Gmail’s SMTP gateway. You’ll have to authenticate to the gateway, and most likely use an app password.
Thanks, @aaronsachs
I don’t have SMTP, using Gmail SMTP gateway. can you please help me to get resolve this error.
when I used the Sensu-core Gmail SMTP gateway is working fine.
@sagar.reddy your command to send doesn’t have the requirements in it to authenticate to Gmail’s SMTP gateway. See their requirements here: https://support.google.com/a/answer/176600?hl=en
Your command is this:
sensu-email-handler -f frommail@gmail.com -t tomail@gmail.com -s smtp.gmail.com -i 25
Which isn’t valid.
The example from the README is this:
sensu-email-handler -f from@example.com -t to@example.com -s smtp.example.com -u user -p password
Does the difference between these two commands make sense?
-i 25
, which doesn’t mean anything. -i
is for an insecure connection, which you’re not able to make to the Gmail SMTP gateway.Both of those last two items are required by Gmail to use their SMTP gateway.
You can view a valid email configuration here: https://github.com/asachs01/sensuGremlinSummitDemo/blob/master/config/handlers/email-basic.yml
Thanks @aaronsachs
below handler worked for me.
sensuctl handler create email-handler --type pipe --command “sensu-email-handler --fromEmail frommailID --toEmail tomailID --smtpHost ‘smtp.gmail.com’ --smtpUsername ‘Usernmae’ --smtpPassword ‘Password’” --timeout 10 --runtime-assets sensu-email-handler