Alerting

Sendemail not working

khilanm
Explorer
  • I have configured email settings as below
  1. smtp.gmail.com:587 with TLS selected
  2. username - email
  3. password

 

  • Search queries I have tried as below:

1) index=_internal | head 5 | sendemail to="<myemail>" server=smtp.gmail.com subject="Here is an email from Splunk" message="This is an example message" sendresults=true

2) index=_internal
| head 5
| sendemail to="<myemail>" server=smtp.gmail.com:587 subject="Here is an email from Splunk" message="This is an example message" sendresults=true

 

 

3)index=_internal
| head 5
| sendemail to="<myemail>" server=smtp.gmail.com:587 use_tls=1 subject="Here is an email from Splunk" message="This is an example message" sendresults=true

4)index=_internal
| head 5
| sendemail to="<myemail>" subject="Here is an email from Splunk" message="This is an example message" sendresults=true

 

  • I have also tried after disabling less secure access apps.
  • Search Query is not even trying to log in I think.

Any help is appreciated thanks.

Labels (3)
0 Karma

00willo
Observer

I also got the "Application-specific password required" error when attempting to use my gmail as my email server.

As I had 2nd factor turned on, I found that I needed to set a separate app-specific password. After discovering this existed, this is how I'd want to do it anyway, even without being forced to. That way, I don't have to put my password that I use day to day for google into the splunk settings.

You can set an app password via https://myaccount.google.com/apppasswords

Here is the help if you need further information. https://support.google.com/accounts/answer/185833?hl=en

 

 

0 Karma
Get Updates on the Splunk Community!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...