Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mail: no address #78

Open
JohnsonHuang4396 opened this issue Apr 28, 2024 · 1 comment
Open

mail: no address #78

JohnsonHuang4396 opened this issue Apr 28, 2024 · 1 comment

Comments

@JohnsonHuang4396
Copy link

Hi, I got the following error:

time="2024-04-28T09:37:31Z" level=error msg="Could not send email to \"[email protected]\": gomail: could not send email 1: gomail: invalid address \"\": mail: no address" 
gomail: could not send email 1: gomail: invalid address "": mail: no address

with the following Drone step:

  - name: back-notify
    pull: if-not-exists
    image: drillster/drone-email
    settings:
      host: smtp.163.com
      port: 465
      subject: 'Drone build: [{{ build.status }}]'
      body: 'Building result: [{{ build.status }}] {{ repo.name }} ({{ repo.branch }}) #{{ build.number }}'
      username: 
         from_secret: EMAIL_USERNAME
      password:
         from_secret: EMAIL_PASSWORD
      recipients_only: true
      recipients: [[email protected]]
    depends_on:
      - back-deploy
    when:
      status:
        - success
        - changed
        - failure

How can I fix this error?

@yanhao98
Copy link

steps:
  - name: notify
    image: 
    settings:
      from.name: Drone CI
      from.address: 
      host: 
      port: 465
      username: 
      password:
        from_secret: email_password
      recipients_only: true
      recipients: [email protected]
      attachments:
        - /drone/src/someFile.txt
        # - /drone/src/someFile.html
    when:
      status:
        - failure
        # - success
depends_on:
  - default-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants