Can't send email from x-pack to gmail

Hi guys.
I'm using x-pack to alert but i can't send email from x-pack to gmail.When it send email it had error "MessagingException[failed to send email with subject [Watcher Notification] via account [gmail_account]]; nested: MessagingException[can't determine local email address]; "
Im using elasticsearch 5.6,
This is my configurable elasticsearch.xml

xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user:aaaaaaaa@gmail.com
password: bbbbbbbbbbb

This is configured action of watcher

"actions" : {
"send_email" : {
"email" : {
"to" : "aaaaa@gmail.com",
"subject" : "Watcher Notification",
"body" : "{{ctx.payload.hits.total}} error logs found"
}
}
}

Please help me.

Hey,

have you set a from address somewhere?

--Alex

why do you use "from" in "action".Please explain detail for me.
i read document at https://www.elastic.co/guide/en/x-pack/current/actions-email.html
"from" don't require in "action"

that example assumes you are using from in your account setup, which you havent either.

OK , thanks for your help. I fixed it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.