Я пытаюсь отправлять электронные письма через nodemailer без транспорта SMTP. Итак, я сделал это:
var mail = require("nodemailer").mail;
mail({
from: "Fred Foo ✔ <[email protected]>", // sender address
to: "******@gmail.com", // list of receivers
subject: "Hello ✔", // Subject line
text: "Hello world ✔", // plaintext body
html: "<b>Hello world ✔</b>" // html body
});
Но когда я бегу, то понимаю:
> node sendmail.js
Queued message #1 from [email protected], to [email protected]
Retrieved message #1 from the queue, reolving gmail.com
gmail.com resolved to gmail-smtp-in.l.google.com for #1
Connecting to gmail-smtp-in.l.google.com:25 for message #1
Failed processing message #1
Message #1 requeued for 15 minutes
Closing connection to the server
Error: read ECONNRESET
at errnoException (net.js:901:11)
at TCP.onread (net.js:556:19)
Я на windows 7 32.
РЕДАКТИРОВАТЬ. Похоже, это ошибка, связанная с Windows, так как она работала в Linux.
ИЗМЕНИТЬ №2
В оболочке git, если я введу telnet smtp.gmail 587
, он заблокируется здесь:
220 mx.google.com ESMTP f7...y.24 -gsmtp
telnet
не работает. - person Vinz243   schedule 15.04.2014