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:

http://jsbin.com/kehofe/1/edit

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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -