Skip to content

Commit

Permalink
Merge pull request nodemailer#101 from wen-bing/master
Browse files Browse the repository at this point in the history
Add support for AUTH LOGIN in SMTP transport configuration
  • Loading branch information
andris9 committed Sep 7, 2012
2 parents 6356572 + ac701d4 commit d14ae62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/engines/smtp.js
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d14ae62

Please sign in to comment.