Archive
Highlighted

Email Configuration Setting is not working for smtp.gmail.com

Path Finder

We have configured Email Settings referring https://www.splunk.com/blog/2014/06/27/splunk-alerts-using-gmail-twitter-phone-calls-and-much-more.h... and
https://answers.splunk.com/answers/38624/how-to-configure-email-alert-using-gmail-smtp.html?utm_sour... links.

But still we are unable to send any mail from Splunk to any of the email id.

While looking in the python.log file we can see below error.

2018-12-05 11:25:16,536 +0000 ERROR sendemail:137 - Sending email. subject="Splunk Alert: Email Test Alert", resultslink="http://seim-server-ip.com:8080/app/search/@go?sid=schedulerjeetsearchRMD5fc99695b46fc7eb6at154400910034778_49871F58-62F1-4AE3-A543-3E01E6B37A56", recipients="[u'san.du@ourdomain.com', u'ext.xyz.aplha@ourdomainext.com', u'testemail@in.ourdomain.com']", server="smtp.gmail.com:587"

2018-12-05 11:25:16,536 +0000 ERROR x - (534, '5.7.14 Please log in via\n5.7.14 your web browser and then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 k26sm37700910pgf.65 - gsmtp') while sending mail to: san.du@ourdomain.com', ext.xyz.aplha@ourdomainext.com

Kindly request you to help us on the same.

Tags (1)
0 Karma
Highlighted

Re: Email Configuration Setting is not working for smtp.gmail.com

Path Finder

As per https://support.google.com/accounts/answer/6010255?hl=en :If an app or device doesn’t meet our security standards, Google will block anyone who tries to sign in from that app or device. Because these apps and devices are easier to break into, blocking them helps keep your account safe.

Change your settings to allow less secure apps into your account. We don't recommend this option because it can make it easier for someone to break into your account. If you want to allow access anyway, follow these steps:

To Fix:
1) I logged into gmail account.

2) Go to https://www.google.com/settings/security/lesssecureapps and Turn On this feature.

3) Go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.

4) I tried to send email from Splunk:
index=internal | head 1 | sendemail to="myemailid@gmail.com" format="html" server=smtp.gmail.com:587 usetls=1

5)And I was able to see the emails send from Splunk to gmail successfully.

Summary: Issue is external to Splunk, Google was blocking emails from Splunk.

0 Karma
Highlighted

Re: Email Configuration Setting is not working for smtp.gmail.com

New Member

It is because Google blocks sign-in attempts from apps which do not use modern security standards (mentioned on their support page). You can however, turn on/off this safety feature by going to the link below:

Go to this link and select Turn On
https://www.google.com/settings/security/lesssecureapps

Moreover google block an ip when you try to send a email since a unusual location, so, you can unblock in the next link
https://support.google.com/accounts/answer/6009563

and clicked in

accounts.google.com/DisplayUnlockCaptcha .

0 Karma
Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.