node.js - trying to send basic nodemailer email -
i'm trying insert test code hard-coded email data directly nodemailer server.js file started basic working example. see "test code" section @ following url:
http://jsbin.com/sibubi/1/edit?html,js,console
server.js loads without issue without test code. however, error occurs when "test code" section included. complains "unsupported configuration" , suggests downgrade copied test code nodemailer website. idea issue might , how fix? here's error:
package.json
"nodemailer": "~1.4.0", "nodemailer-smtp-transport":"~1.0.3"
install them
your controller code
var nodemailer = require('nodemailer'); var smtptransport = require('nodemailer-smtp-transport'); var transport = nodemailer.createtransport((smtptransport({ host: your_host, secureconnection: false, // use ssl port: 587, // port secure smtp auth: { user: your_username, pass: your_password } })));
you need change smtp configuration mentioned above. , rest same 0.7 version code.
Comments
Post a Comment