How to resolve '530 5.7.0 Must issue a STARTTLS command first. o63-v6sm4041934ywc.36 - gsmtp\n'?


(Vyankatesh S Repal) #1

HI, I am creating an application where I need to send an email alert for my logs.
Here is input to create a watcher:

PUT _xpack/watcher/watch/log_error_watch
{
  "trigger" : {
    "schedule" : { "interval" : "10s" } 
  },
  "input" : {
    "search" : {
      "request" : {
        "indices" : [ "testindexv4" ],
        "body" : {
          "query" : {
            "match" : { "log_level": "ERROR" }
          }
        }
      }
    }
  }
  ,
  "actions" : {
  "send_email" : { 
    "email" : { 
      "to" : "<mailId>@gmail.com", 
      "subject" : "Watcher Notification", 
      "body" : "error logs found" 
    }
  }
}
}

Here is configuration for elasticsearch.yml

xpack.security.enabled: false
xpack.notification.email.account:
      standard_account:
         profile: standard
         smtp:
             auth: false
             starttls.enable: false
             starttls.required: false
             host: smtp.gmail.com
             port: 587

When I try to run my watcher, I get the error as:

reason": "530 5.7.0 Must issue a STARTTLS command first. o63-v6sm4041934ywc.36 - gsmtp\n

any solution on the same please?


(Alexander Reelsen) #2

you disabled starttls, but the mail server seems to require it. have you tried enabling it?


(system) #3

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