adonisjs / mail

AdonisJS Email Provider
MIT License
106 stars 34 forks source link

Try to fix adonis mail package setup #47

Closed vkaelin closed 4 years ago

vkaelin commented 4 years ago

Proposed changes

Hi! I tried to install the mail package in an Adonis 5 application, but I had a lot of troubles. Here are the chances I had to make in the node_modules directory to remove all the errors when I start my website.

I also noticed that the SES driver was not published on npm yet.

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

annymosse commented 4 years ago

@vkaelin there's an error on tests

✖ send email using ses driver
    Test timeout after 10000 milliseconds

Smtp Driver

  ✖ send email using smtp driver
    Error: connect ECONNREFUSED 127.0.0.1:587
vkaelin commented 4 years ago

@vkaelin there's an error on tests

✖ send email using ses driver
    Test timeout after 10000 milliseconds

Smtp Driver

  ✖ send email using smtp driver
    Error: connect ECONNREFUSED 127.0.0.1:587

Yeah I know but these errors are already there before my PR. Not sure why.

EDIT: I think we need a mail server (SMTP) or something, here are my tests errors:

  ✖ send email using ses driver (20ms)

Smtp Driver
  ✖ send email using smtp driver (2s)

 FAILED 

total         : 48
failed        : 2
passed        : 46
duration      : 2s

Ses Driver

  ✖ send email using ses driver
    InvalidParameterType: Expected params.Source to be a string
    at ParamValidator.fail (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:50:37)
    at ParamValidator.validateType (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:232:10)
    at ParamValidator.validateString (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:154:32)
    at ParamValidator.validateScalar (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:130:21)
    at ParamValidator.validateMember (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:94:21)
    at ParamValidator.validateStructure (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:75:14)
    at ParamValidator.validateMember (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:88:21)
    at ParamValidator.validate (C:\data\mail-og\node_modules\aws-sdk\lib\param_validator.js:34:10)
    at Request.VALIDATE_PARAMETERS (C:\data\mail-og\node_modules\aws-sdk\lib\event_listeners.js:126:42)
    at Request.callListeners (C:\data\mail-og\node_modules\aws-sdk\lib\sequential_executor.js:106:20)

Smtp Driver

  ✖ send email using smtp driver
    Error: connect ECONNREFUSED 127.0.0.1:587
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14)
npm ERR! Test failed.  See above for more details.