nodemailer / smtp-server

Create custom SMTP servers on the fly
Other
846 stars 146 forks source link

Returning an Error to onConnect has no effect #78

Closed CliffS closed 7 years ago

CliffS commented 7 years ago

In its simplest form, I have:

var server = new SMTPServer({
   onConnect: function(session, callback) {
        callback(new Error "Blacklisted");
    }
});

I get:

554 Blacklisted
220 mail.might.be ESMTP

whereas I would have expected it to drop the connection. If the client ignores the 554, it can carry on and send mail.

What am I missing?

andris9 commented 7 years ago

Oh, dang, this seems to have been around for a long time without no-one noticing. Fixed and released as v2.0.2

CliffS commented 7 years ago

Thank you for that speedy response and fix.