twilson63 / express-couchUser

A express module for CouchDb based User Authentication Module
http://twilson63.github.io/express-couchUser
35 stars 11 forks source link

SMTP Config - RecipientError - 550 Administrative Prohibition Error #46

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hey there,

I'm unable to get your node-email-templates integration working. In other projects I'm using node-email-templates, nodemailer and the node-mailer-smtp-transport plugin directly, so I know my credentials are fine. Is there something wrong with my setup? It is:

email: {
    service: 'SMTP',
    SMTP: {
        host: Config.email.host, // smtp.hostingprovider.com
        port: Config.email.port, // 587
        auth: {
            user: Config.email.user, // my email address
            pass: Config.email.pass // my password
        },
        ignoreTLS: true // got this from the node-simplesmtp npm page
    },
    templateDir: `${Config.root}/server/templates/` // verified correct
}

One the client side, I get this error:

{
     "message": "Can't send mail - all recipients were rejected",
     "stack": "RecipientError: Can't send mail - all recipients were rejected\n, // etc
     "name": "RecipientError",
     "data": "550 Administrative prohibition",
     "stage": "rcpt"
}

The process also crashes the node server, with this error:

POST /api/user/forgot 500 2626.020 ms - 695
events.js:142
      throw er; // Unhandled 'error' event
      ^

Error: 140735214301184:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:../deps/openssl/openssl/ssl/s3_pkt.c:362:

    at Error (native)
ghost commented 8 years ago

Again, looking through the source, I found another configuration option that I don't remember seeing in the docs: config.email.from. It was defaulting to my machine name.