code: function send_mail(opts) {
  	var Q = require('q');
  	var nodemailer = require("nodemailer");
  
  	var smtpTransport = nodemailer.createTransport("SMTP", config.smtp);
  	
  	// setup e-mail data with unicode symbols
  	var mailOptions = {
  		from: opts.from,
  		to: opts.to,
  		subject: opts.subject,
  		text: opts.text,
  		html: opts.html
  	};
  	
  	// send mail with defined transport object
  	var defer = Q.defer();
  	try {
  		util.debug('Calling smtpTransport.sendMail()...');
  		smtpTransport.sendMail(mailOptions, function(error, response){
  			util.debug('End of smtpTransport.sendMail()');
  			if(error){
  				defer.reject(error);
  				return;
  			}
  			defer.resolve(response);
  		});
  	} catch(err) {
  		defer.reject(err);
  	}
  	return defer.promise.fin(function() { smtpTransport.close(); });
  }
docs: The sending of an email message