Merge pull request #223 from matiu/bug/emailstorage

Bug/emailstorage
This commit is contained in:
Gustavo Maximiliano Cortez 2014-10-30 23:39:49 -03:00
commit 430cad4c76

View File

@ -158,19 +158,21 @@ emailPlugin.sendVerificationEmail = function (email, secret) {
var emailBody = results[0]; var emailBody = results[0];
var emailBodyHTML = results[1]; var emailBodyHTML = results[1];
var mailOptions = { var mailOptions = {
from: 'Insight Services <insight@bitpay.com>', from: 'Insight Services <wallet@copay.io>',
to: email, to: email,
subject: '[Copay] Your wallet backup needs confirmation', subject: '[Copay] Your wallet backup needs confirmation',
text: emailBody, text: emailBody,
html: emailBodyHTML html: emailBodyHTML
}; };
console.log('Sending email to:', email); //TODO
// send mail with defined transport object // send mail with defined transport object
emailPlugin.email.sendMail(mailOptions, function (err, info) { emailPlugin.email.sendMail(mailOptions, function (err, info) {
if (err) { if (err) {
logger.error('An error occurred when trying to send email to ' + email, err); logger.error('An error occurred when trying to send email to ' + email, err);
} else { } else {
logger.error('Message sent: ' + info.response); logger.error('Message sent: ', info);
} }
}); });
}); });