Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

getting :-errors while sending mail with attachments #7

Open
kunal-piplani-incontact opened this issue Sep 13, 2017 · 2 comments
Open

Comments

@kunal-piplani-incontact

error details 👎
: Error: connect EINVAL 0.0.4.210:465 - Local (0.0.0.0:0)
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at connect (net.js:874:16)
at net.js:1003:7
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
code: 'ECONNECTION',
errno: 'EINVAL',
syscall: 'connect',
address: '0.0.4.210',
port: 465,
command: 'CONN' }

yaml file:-

resources:

jobs:

  • name: send-email-with-attachment
    serial: true
    public: true
    plan:
    • do:

      • get: pipeline-scripts
        trigger: false

      • task: prep-email-text
        config:
        platform: linux
        image_resource:
        type: docker-image
        source:
        repository: pivotalservices/concourse-send-email
        tag: "latest"
        outputs:
        - name: email-text
        run:
        path: sh
        args:
        - -exc
        - |
        echo "Hello Concourse user" > ./email-text/email-subject.txt
        echo "This email is from my Concourse pipeline. You will find my file attached. Thanks!" > ./email-text/email-body.txt

      • task: send-email-with-attachment
        file: pipeline-scripts/email-with-attachments/ci/tasks/send-email.yml
        params:
        SMTP_HOST: {{smtp-host}}
        SMTP_PORT: {{smtp-port}}
        SMTP_USERNAME: {{smtp-username}}
        SMTP_PASSWORD: {{smtp-password}}
        EMAIL_FROM: {{email-from}}
        EMAIL_TO: {{email-to}}
        EMAIL_SUBJECT_FILE: ./email-text/email-subject.txt
        EMAIL_BODY_FILE: ./email-text/email-body.txt
        EMAIL_ATTACHMENTS: '[{ "filename": "my-attachment.txt","path": "./pipeline-scripts/email-with-attachments/my-attachment.txt", "contentType":"text/plain"}]'

      on_failure:
      task: email-notification-failure
      file: pipeline-scripts/email-with-attachments/ci/tasks/send-email.yml
      params:
      SMTP_HOST: {{smtp-host}}
      SMTP_PORT: {{smtp-port}}
      SMTP_USERNAME: {{smtp-username}}
      SMTP_PASSWORD: {{smtp-password}}
      EMAIL_FROM: {{email-from}}
      EMAIL_TO: {{email-to}}
      EMAIL_SUBJECT_TEXT: Pipeline failure
      EMAIL_BODY_TEXT: This is the report of a pipeline failure. See attachment for more info.
      EMAIL_ATTACHMENTS: '[{ "filename": "my-attachment.txt","path": "./pipeline-scripts/email-with-attachments/my-attachment.txt", "contentType":"text/plain"}]'

it is failing when it si going to call the node pipeline-scripts/email-with-attachments/ci/scripts/send-email.js

@kunal-piplani-incontact
Copy link
Author

@lsilvapvt can you please look into it , or anyone else please look into the issue .
@ALL

@shinji62
Copy link

Does your smtp server is really 0.0.4.210:465 Sounds strange as smtp address.

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

No branches or pull requests

2 participants