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

**URL:** <https://discuss.elastic.co/t/how-to-resolve-530-5-7-0-must-issue-a-starttls-command-first-o63-v6sm4041934ywc-36-gsmtp-n/149447>\
**Category:** Elasticsearch\
**Created:** [September 21, 2018, 12:28pm UTC](https://discuss.elastic.co/t/how-to-resolve-530-5-7-0-must-issue-a-starttls-command-first-o63-v6sm4041934ywc-36-gsmtp-n/149447 "2018-09-21T12:28:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vyankatesh\_S\_Repal](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@Vyankatesh\_S\_Repal](https://discuss.elastic.co/u/Vyankatesh_S_Repal)\
**Post date:** [September 21, 2018, 12:28pm UTC](https://discuss.elastic.co/t/how-to-resolve-530-5-7-0-must-issue-a-starttls-command-first-o63-v6sm4041934ywc-36-gsmtp-n/149447/1 "2018-09-21T12:28:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 21, 2018, 12:49pm UTC](https://discuss.elastic.co/t/how-to-resolve-530-5-7-0-must-issue-a-starttls-command-first-o63-v6sm4041934ywc-36-gsmtp-n/149447/2 "2018-09-21T12:49:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 19, 2018, 12:49pm UTC](https://discuss.elastic.co/t/how-to-resolve-530-5-7-0-must-issue-a-starttls-command-first-o63-v6sm4041934ywc-36-gsmtp-n/149447/3 "2018-10-19T12:49:07Z")

</div>

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