Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error: no form of authorization supported #59

Closed
adamhalasz opened this Issue · 3 comments

4 participants

@adamhalasz

I'm trying to use emailjs with haraka, but I'm getting this error while I try to test it:

{ [Error: no form of authorization supported] code: 7, smtp: undefined }

Here is the code:

var email = use("/usr/local/lib/node_modules/emailjs");

var mail  = email.server.connect({
    user        : "my@email.com", 
    password    : "my_password", 
    host        : "localhost", 
    domain      : 'localhost',
    ssl         : false,
    port        : 587,
});

// send message
mail.send({
   text:    "i hope this works", 
   from:    "ME! <my@email.com>", 
   to:      "Adam <to@myself.com>",
   subject: "testing emailjs"
}, function(err, message) { 
    console.log(err || message); 
});
@sandeepeecs

Even i am facing the same problem. Let me know if you found any thing.
{ [Error: no form of authorization supported] code: 7, smtp: undefined }

var email = require('emailjs');
var server = email.server.connect({
user: "correctusername",
password:"correctpassword",
host: "mail.domain.com"

});

@aikomastboom

I just had the same issue, turned out the server I am trying to talk to is an Exchange server, and on port 25 it wants NTLM authorization. Talking to port 587 however allows (in my case) LOGIN authentication.

my debug strategy:

add

console.log('feature', parse[1].toLowerCase(), parse[2]);

to line 310 of node_modules/winston-mail/node_modules/emailjs/smtp/smtp.js

to log what feature 'auth' your server returns.

@eleith
Owner

you can turn on debug statements in smtp/client.js. the SMTP server should respond with authorizations that it supports. this library only has a handful of authorization supports as of now, but i'm happy to see more get added if needed

@eleith eleith closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.