Meteor registration verification email not sent on production -
i have tested meteor app on dev , verification email sent out. on production not. maybe content of smtp.js? code follows:
// server/smtp.js meteor.startup(function () { var smtp = { username: 'dummy@wbs.co.za', password: 'hw783378hjshd', server: 'smtp.wbs.co.za', port: 25 } process.env.mail_url = 'smtp://' + encodeuricomponent(smtp.username) + ':' + encodeuricomponent(smtp.password) + '@' + encodeuricomponent(smtp.server) + ':' + smtp.port; });
// (server-side) meteor.startup(function() { // default, email sent no-reply@meteor.com. if wish receive email users asking account, sure set email address can receive email at. accounts.emailtemplates.from = 'noreply <no-reply@meteor.com>'; // public name of application. defaults dns name of application (eg: awesome.meteor.com). accounts.emailtemplates.sitename = 'no reply'; // function takes user object , returns string subject line of email. accounts.emailtemplates.verifyemail.subject = function(user) { return 'confirm email address'; }; // function takes user object , url, , returns body text email. // note: if need return html instead, use accounts.emailtemplates.verifyemail.html accounts.emailtemplates.verifyemail.html = function(user, url) { return 'click on following link verify email address: ' + url; }; }); // (server-side) called whenever login attempted accounts.validateloginattempt(function(attempt){ if (attempt.user && attempt.user.emails && !attempt.user.emails[0].verified ) { console.log('email not verified'); throw new meteor.error(403, 'verification email has been sent email address. use url in email verify yourself.'); return false; // login aborted } return true; });
please help.
Comments
Post a Comment