Help needed for sending email via Gmail SMTP

Hello!

I’m trying to send email using Gmail SMTP without success so far…

My kapacitor.conf (I’m still testing so I send emails to myself):

[smtp]
  enabled = true
  host = "smtp.gmail.com"
  port = 587
  username = "blabla@gmail.com"
  password = "*********"
  no-verify = false
  global = false
  state-changes-only = false
  from = "blabla@gmail.com"
  to = ["blabla@gmail.com"]
  idle-timeout = "300s"

The relevant part of my tick.script (alerts are logged but no email is sent):

// Alert
alert
.log('/tmp/GENERAL_alert.log')
.email('blabla@gmail.com')

Any idea on what I am doing wrong?

Thanks!

@laeis Are you seeing anything in the kapacitor logs?

@jackzampolin thanks for the quick answer!
Yes alerts are logged in /tmp/GENERAL_alert.log as normal, and I don’t get any invalid TICKscript warning from kapacitor

@laeis I have a feeling this is something on the GMail side. I’ve had issues setting this up in the past using the smtp.google.com endpoint. Are you running on GCE?

@jackzampolin thanks again for the time you take.
No I’m not using GCE, I’m running kapacitor 1.3 and influxdb 1.2 on Oracle VirtualBox 5.1.22 (latest version)

@laeis Do you have a tutorial you followed for the Gmail setup? I have a feeling that gmail is dropping your emails and not telling you.

Hello @jackzampolin sorry for the delay.

I received this week-end an email from Google regarding the access of my account, for “less secured applications” to be precise. I allowed the access and now it works!
You must be right, gmail was dropping the emails before I gave the access.

I just don’t understand why that email didn’t arrived earlier: I was trying to send emails for nearly a week…

Anyway thank you very much for your help!

1 Like