Email notification not work

I am using drone-server & agent 1.1, VM virtualbox to install them, so my drone_server is localhost:8000.

I want to send email for notification with both secrets and plain text, but it is in vain.
the Error message always prompt. Can someone give me some tips on setting up the email notification?

‘level=error msg=“Error while dialing SMTP server: dial tcp :587: getsockopt: connection refused” dial tcp :587: getsockopt: connection refused’.

  • name: notify
    image: drillster/drone-email
    from: (myGmail)
    • (myGmail)
      username: xxxx
      password: xxxx
      secrets: [ email_username, email_password, email_host ] # or fail to use this format instead of ‘host, username & password’
      subject: >
      [{{ build.status }}]
      {{ repo.owner }}/{{ }}
      ({{ build.branch }} - {{ truncate build.commit 8 }})
      body: >