Permalink
Browse files

Add authMethod in configuration to support AUTH LOGIN in SMTP transport.

  • Loading branch information...
1 parent 6356572 commit ac701d44cca26a112ed0c664c92410987e0a15b7 Wenbin(U12) committed Sep 7, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/engines/smtp.js
View
@@ -19,6 +19,7 @@ module.exports = SMTPTransport;
* <li><b>port</b> - port of the SMTP server</li>
* <li><b>secureConnection</b> - use SSL</li>
* <li><b>name</b> - the name of the client server</li>
+ * <li><b>authMethod</b> -specified the authMethod, value can be ["plain", "login"], default is "plain"</li>
* <li><b>auth</b> - authentication object as <code>{user:"...", pass:"..."}</code>
* <li><b>ignoreTLS</b> - ignore server support for STARTTLS</li>
* <li><b>debug</b> - output client and server messages to console</li>
@@ -53,6 +54,7 @@ SMTPTransport.prototype.initOptions = function(){
if(!this.options.auth){
this.options.auth = {};
}
+ this.options.authMethod = this.options.authMethod || "PLAIN";
this.options.auth.user = this.options.auth.user || this.options.user;
this.options.auth.pass = this.options.auth.pass || this.options.pass;
this.options.auth.XOAuthToken = this.options.auth.XOAuthToken || this.options.XOAuthToken;

0 comments on commit ac701d4

Please sign in to comment.