Drillster / drone-email

Drone plugin for sending email notifications
Apache License 2.0
44 stars 43 forks source link

timeout error while sending mails using gmail #63

Closed biju-ps closed 2 years ago

biju-ps commented 2 years ago

I am getting a timeout error while sending mails through gmail

latest: Pulling from drillster/drone-email Digest: sha256:cfa526be2c76c4d01006d2541df2290daa6dbf8a103287ad35b4a8d3ac747315 Status: Image is up to date for drillster/drone-email:latest time="2022-04-20T07:00:35Z" level=error msg="Error while dialing SMTP server: dial tcp 142.250.182.69:587: i/o timeout" dial tcp 142.250.182.69:587: i/o timeout

here is my configuration email_host = mail.google.com

 name: notify
  image: drillster/drone-email
  environment:
    EMAIL_HOST:
      from_secret: email_host
    EMAIL_USERNAME:
      from_secret: email_username
    EMAIL_PASSWORD:
      from_secret: email_password
  settings:
    from: noreply@domain.con
    recipients:
      - biju@dmaon.com
  when:
    status:
      - failure
      - changed
  branch:
    - master
mjwwit commented 2 years ago

You'll need to double check GMail's SMTP config, it probably doesn't allow usage of port 587.

biju-ps commented 2 years ago

As per this, Gmail allow allow usage of port 587.

mjwwit commented 2 years ago

That page also states you should use smtp.gmail.com, not mail.google.com as your host. Have you tried that?

mjwwit commented 2 years ago

I'm assuming my suggestion fixed the issue. If not, please re-open.