Hi, I'm trying to make the email action work for office365 and I keep getting this error. I'm able to make the smtp work fine when I use the email output in my logstash config file but now I think I'd rather do it with Watcher.
"id": "send_email",
"type": "email",
"status": "failure",
"reason": "MessagingException[failed to send email with subject [Watcher Notification] via account [outlook_account]]; nested: SMTPSendFailedException
[550 5.7.60 SMTP; Client does not have permissions to send as this sender\n]; "
Here are my elasticsearch.yml and watcher actions
xpack.notification.email.account:
outlook_account:
profile: outlook
smtp:
auth: true ##I've tried to make false but same error
starttls.enable: true
host: smtp.office365.com ## instead of smtp-mail.outlook.com
port: 587
user: <username>
password: <password>
and action:
"actions" : {
"send_email" : {
"email" : {
"to" : "kofi@mydomain.com",
"subject" : "Watcher Notification",
"body" : "{{ctx.payload.hits.total}} error logs found"
}
}
}
Any idea why this isn't working for me?