example/ChatExample/app/controllers/users/users.password.server.controller.js
function(emailHTML, user, done) {
			var smtpTransport = nodemailer.createTransport(config.mailer.options);
			var mailOptions = {
				to: user.email,
				from: config.mailer.from,
				subject: 'Your password has been changed',
				html: emailHTML
			};

			smtpTransport.sendMail(mailOptions, function(err) {
				done(err, 'done');
			});
		}
function(emailHTML, user, done) {
			var smtpTransport = nodemailer.createTransport(config.mailer.options);
			var mailOptions = {
				to: user.email,
				from: config.mailer.from,
				subject: 'Your password has been changed',
				html: emailHTML
			};

			smtpTransport.sendMail(mailOptions, function(err) {
				done(err, 'done');
			});
		}
function ( emailHTML , user , done ) { var smtpTransport = nodemailer . createTransport ( config . mailer . options ) ; var mailOptions = { to : user . email , from : config . mailer . from , subject : 'Your password has been changed' , html : emailHTML } ; smtpTransport . sendMail ( mailOptions , function ( err ) { done ( err , 'done' ) ; } ) ; }
If valid email, send reset email using service
If valid email send reset email using service