mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Fixes smtp/auth bug: https://github.com/node-red/node-red-nodes/issues/279 (#280)
This commit is contained in:
		
				
					committed by
					
						 Dave Conway-Jones
						Dave Conway-Jones
					
				
			
			
				
	
			
			
			
						parent
						
							6ace40c1f2
						
					
				
				
					commit
					f15f8598f3
				
			| @@ -52,22 +52,19 @@ module.exports = function(RED) { | ||||
|         } | ||||
|         var node = this; | ||||
|  | ||||
|         var smtpTransport = nodemailer.createTransport({ | ||||
|         var smtpOptions = { | ||||
|             host: node.outserver, | ||||
|             port: node.outport, | ||||
|             secure: node.secure, | ||||
|             auth: { | ||||
|                 user: node.userid, | ||||
|                 pass: node.password | ||||
|             } | ||||
|         }); | ||||
|             secure: node.secure | ||||
|         } | ||||
|  | ||||
|         if(this.userid && this.password) { | ||||
|             smtpTransport.auth = { | ||||
|             smtpOptions.auth = { | ||||
|                 user: node.userid, | ||||
|                 pass: node.password | ||||
|             }; | ||||
|         } | ||||
|         var smtpTransport = nodemailer.createTransport(smtpOptions); | ||||
|  | ||||
|         this.on("input", function(msg) { | ||||
|             if (msg.hasOwnProperty("payload")) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user