25
rated 0 times
[
26]
[
1]
/ answers: 1 / hits: 19258
/ 9 Years ago, tue, june 2, 2015, 12:00:00
i'm trying to use the emailjs (https://github.com/eleith/emailjs) for send emails with nodejs, but, it gives me an error: { [Error: timedout while connecting to smtp server] code: 4, smtp: undefined }
I'm trying to use hotmail, but I can use other, I only want this working. Any idea please?
var email = require(emailjs);
var server = email.server.connect({
user: [email protected],
password:xxxyyyy,
host: smtp-mail.live.com,
ssl: true
});
// send the message and get a callback with an error or details of the message that was sent
server.send({
text: i hope this works,
from: you <[email protected]>,
to: someone <[email protected]>,
//cc: else <[email protected]>,
subject: testing emailjs
}, function(err, message) { console.log(err || message); });
More From » node.js