Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't try to authenticate unless a username is given.

  • Loading branch information...
commit 4ca515f37a5c05dc70bb507869c4017c1f05db13 1 parent 041403c
@weaver weaver authored
Showing with 10 additions and 7 deletions.
  1. +9 −6 lib/mail/index.js
  2. +1 −1  package.json
View
15 lib/mail/index.js
@@ -275,13 +275,16 @@ Client.prototype.smtpAUTH = function(next, mechanisms) {
var names = mechanisms.toUpperCase().split(/\s+/),
method;
- for (var i = 0, l = names.length; i < l; i++) {
- method = this['auth' + names[i]];
- if (method) {
- method.call(this, this.username, this.password, next);
- break;
+ if (!this.username)
+ next();
+ else
+ for (var i = 0, l = names.length; i < l; i++) {
+ method = this['auth' + names[i]];
+ if (method) {
+ method.call(this, this.username, this.password, next);
+ break;
+ }
}
- }
};
// LOGIN mechanism <http://www.fehcom.de/qmail/smtpauth.html#FRAMEWORK>
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "mail",
"description": "This SMTP client library for Node.JS helps you send email safely and easily.",
- "version": "0.1.0",
+ "version": "0.1.1",
"author": "Ben Weaver <ben@orangesoda.net>",
"contributors": [],
"dependencies": {},
Please sign in to comment.
Something went wrong with that request. Please try again.