lfapi
changeset 5:ef8aff2e0f67
Replaced mailer by nodemailer for sending emails.HG:' are removed.
author | bsw |
---|---|
date | Mon Oct 24 20:53:24 2011 +0200 (2011-10-24) |
parents | 77b761569ae2 |
children | cf05d9428ecc |
files | config.js lfapi/main.js |
line diff
1.1 --- a/config.js Mon Oct 24 20:32:49 2011 +0200 1.2 +++ b/config.js Mon Oct 24 20:53:24 2011 +0200 1.3 @@ -23,13 +23,6 @@ 1.4 1.5 // mail server, email sender and subject settings 1.6 exports.mail = { 1.7 - smtp_host: 'localhost', 1.8 - smtp_port: '25', 1.9 - smtp_ssl: false, 1.10 - smtp_domain: 'localhost', 1.11 - //smtp_authentication: 'login', 1.12 - //smtp_username: 'username', 1.13 - //smtp_password: 'password', 1.14 from: 'Sender name <senderaddress@example.org>', 1.15 subject_prefix: '[email subject prefix] ' 1.16 };
2.1 --- a/lfapi/main.js Mon Oct 24 20:32:49 2011 +0200 2.2 +++ b/lfapi/main.js Mon Oct 24 20:53:24 2011 +0200 2.3 @@ -24,7 +24,7 @@ 2.4 2.5 var selector = db.selector; 2.6 2.7 -var email = require('mailer'); 2.8 +var nodemailer = require('nodemailer'); 2.9 2.10 2.11 // check if current session has at least given access level, returns error to client if not. 2.12 @@ -1039,15 +1039,10 @@ 2.13 2.14 db.query(conn, req, res, query, function (result, conn) { 2.15 2.16 + nodemail.sendmail = '/usr/bin/sendmail'; 2.17 + 2.18 // send email to user 2.19 - email.send({ 2.20 - host : config.mail.smtp_host, 2.21 - port: config.mail.smtp_port, 2.22 - ssl: config.mail.smtp_ssl, 2.23 - domain: config.mail.smtp_domain, 2.24 - authentication: config.mail.smtp_authentication, 2.25 - username: config.mail.smtp_username, 2.26 - password: config.mail.smtp_password, 2.27 + nodemailer.send_mail({ 2.28 from: config.mail.from, 2.29 subject: config.mail.subject_prefix + "Your LiquidFeedback API alpha test account needs confirmation", 2.30 to: member_notify_email,