java.lang.IllegalArgumentException: no accounts of type [email] configured. Please set up an account using the [xpack.notification.email] settings

Configured the gmail account set up in elasticsearch.yml and allowed 2 step verification for it.

xpack.notification:
   email.account.gmail_account:
       smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: xxx@gmail.com
            password: xxxxxx

This config worked for me on 6.2 and I do receive emails via watcher email action. Can you please verify your config?

Thanks
Rashmi