Comments (5)
Did you run node bin/configure.js
?
If so, it probably means your email creds are not correct. What you using to send your email? A gmail account?
from hapi-dash.
Indeed, I did run node bin/configure.js
.
My email credentials that I supplied are correct. I tried using nodemailer 0.7.1
in a simple script to send a message through the Gmail SMTP client in the same way your code is doing so, and it is failing:
var nodemailer = require('nodemailer');
// create reusable transporter object using SMTP transport
var transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
user: '[email protected]',
pass: 'userpass'
}
});
// setup e-mail data with unicode symbols
var mailOptions = {
from: 'Jonanthan Whitaker ✔ <[email protected]>', // sender address
to: '[email protected]', // list of receivers
subject: 'Hello ✔', // Subject line
text: 'Hello world ✔', // plaintext body
html: '<b>Hello world ✔</b>' // html body
};
// send mail with defined transport object
transporter.sendMail(mailOptions, function(error, info){
if(error){
console.log(error);
}else{
console.log('Message sent: ' + info.response);
}
});
With the latest version of nodemailer (1.4.0) it works just fine. However, if 0.7.1 I get the error:
$ node test-nodemailer.js [Error: No transport method defined]
from hapi-dash.
Ok I haven't updated dependencies in a while as I have been working on
other projects. Sounds like I need to bump nodemailer to 1.4.0.
Will fix it up at some point today.
On 14 July 2015 at 23:14, Jonathan Whitaker [email protected]
wrote:
Indeed, I did run node bin/configure.js.
My email credentials that I supplied are correct. I tried using nodemailer
0.7.1 in a simple script to send a message through the Gmail SMTP client
in the same way your code is doing so, and it is failing:var nodemailer = require('nodemailer');
// create reusable transporter object using SMTP transport
var transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
user: '[email protected]',
pass: 'userpass'
}
});// setup e-mail data with unicode symbols
var mailOptions = {
from: 'Jonanthan Whitaker ✔ [email protected]', // sender address
to: '[email protected]', // list of receivers
subject: 'Hello ✔', // Subject line
text: 'Hello world ✔', // plaintext body
html: 'Hello world ✔' // html body
};// send mail with defined transport object
transporter.sendMail(mailOptions, function(error, info){
if(error){
console.log(error);
}else{
console.log('Message sent: ' + info.response);
}
});With the latest version of nodemailer (1.4.0) it works just fine. However,
if 0.7.1 I get the error:$ node test-nodemailer.js
[Error: No transport method defined]—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from hapi-dash.
Great! Thanks ;)
from hapi-dash.
Bumped now!
On 15 July 2015 at 14:43, Jonathan Whitaker [email protected]
wrote:
Great! Thanks ;)
—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from hapi-dash.
Related Issues (12)
- Error on npm install and run HOT 6
- Upgrade to hapi8 HOT 4
- Can't start HOT 3
- can't start success HOT 3
- Update deps and make work with node v4 HOT 1
- Deprecation Notice
- Throws when configuring mongo host HOT 8
- What are the benefits of using a separate server for api & gui? HOT 2
- The core cred HOT 1
- authentication is not working HOT 5
- Best way to add a few more features HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hapi-dash.