I'm using Nodemailer (Node js) to send Email via Gmail but i'm getting errorSending emails in Node.js?Nodemailer with Gmail and NodeJSNodeMailer : getaddrinfo Errorsend email via nodemailerNodemailer Gmail timeoutECONNREFUSED on NodeUsing nodemailer and smtp send mail without authenticationUnable to send email through node js, tried few methodsNodemailer - SMTP Timeout - office365sendgrid set up with @sendgrid/mail
Importance of electrolytic capacitor size
How does Harry wear the invisibility cloak?
Do index funds really have double-digit percents annual return rates?
What happens if I double Meddling Mage's 'enter the battlefield' trigger?
Time to call the bluff
Adding transparency to ink drawing
Why would a Intel 8080 chip be destroyed if +12 V is connected before -5 V?
Too many SOQL Queries when inserting records
Does POSIX guarantee the paths to any standard utilities?
Do mortgage points get applied directly to the principal?
One hour 10 min layover in Newark; International -> Domestic connection. Enough time to clear customs?
Go for an isolated pawn
How could it be that the capo isn't changing the pitch?
Generate points for smooth movement between two given points
Splitting polygons at narrowest part using R?
Was "The Hobbit" ever abridged?
Punishment in pacifist society
Why didn't Thatcher give Hong Kong to Taiwan?
How to encode a class with 24,000 categories?
Is there any difference between these two sentences? (Adverbs)
What is the most likely cause of short, quick, and useless reviews?
How many days for hunting?
How do I make my fill-in-the-blank exercise more obvious?
MOSFET broke after attaching capacitor bank
I'm using Nodemailer (Node js) to send Email via Gmail but i'm getting error
Sending emails in Node.js?Nodemailer with Gmail and NodeJSNodeMailer : getaddrinfo Errorsend email via nodemailerNodemailer Gmail timeoutECONNREFUSED on NodeUsing nodemailer and smtp send mail without authenticationUnable to send email through node js, tried few methodsNodemailer - SMTP Timeout - office365sendgrid set up with @sendgrid/mail
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to send email via Gmail or other email provider like office 365 using Nodemailer as my module Node.js.
I wanna ask also if there's a proxy or firewall setting to disable so that I can send email using gmail or office 365.
Or maybe there is something wrong with my code ?
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
function sendEmail(to, subject, html)
nodemailer.createTestAccount((err, account) =>
let transporter = nodemailer.createTransport(
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth:
user: 'philip@gmail.com',
pass: 'sercretpass'
);
let mailOptions =
from: '"Admin" ',
to: to,
subject: subject,
html: html
;
transporter.sendMail(mailOptions, (error, info) =>
if (error)
console.log('Error', error);
else
console.log('Success', info);
);
);
module.exports.sendEmail = sendEmail;
MY ERROR :
Error Error: connect ETIMEDOUT 74.125.203.108:465
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1121:14)
errno: 'ETIMEDOUT',
code: 'ECONNECTION',
syscall: 'connect',
address: '74.125.203.108',
port: 465,
command: 'CONN'
node.js node-modules
add a comment |
I want to send email via Gmail or other email provider like office 365 using Nodemailer as my module Node.js.
I wanna ask also if there's a proxy or firewall setting to disable so that I can send email using gmail or office 365.
Or maybe there is something wrong with my code ?
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
function sendEmail(to, subject, html)
nodemailer.createTestAccount((err, account) =>
let transporter = nodemailer.createTransport(
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth:
user: 'philip@gmail.com',
pass: 'sercretpass'
);
let mailOptions =
from: '"Admin" ',
to: to,
subject: subject,
html: html
;
transporter.sendMail(mailOptions, (error, info) =>
if (error)
console.log('Error', error);
else
console.log('Success', info);
);
);
module.exports.sendEmail = sendEmail;
MY ERROR :
Error Error: connect ETIMEDOUT 74.125.203.108:465
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1121:14)
errno: 'ETIMEDOUT',
code: 'ECONNECTION',
syscall: 'connect',
address: '74.125.203.108',
port: 465,
command: 'CONN'
node.js node-modules
add a comment |
I want to send email via Gmail or other email provider like office 365 using Nodemailer as my module Node.js.
I wanna ask also if there's a proxy or firewall setting to disable so that I can send email using gmail or office 365.
Or maybe there is something wrong with my code ?
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
function sendEmail(to, subject, html)
nodemailer.createTestAccount((err, account) =>
let transporter = nodemailer.createTransport(
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth:
user: 'philip@gmail.com',
pass: 'sercretpass'
);
let mailOptions =
from: '"Admin" ',
to: to,
subject: subject,
html: html
;
transporter.sendMail(mailOptions, (error, info) =>
if (error)
console.log('Error', error);
else
console.log('Success', info);
);
);
module.exports.sendEmail = sendEmail;
MY ERROR :
Error Error: connect ETIMEDOUT 74.125.203.108:465
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1121:14)
errno: 'ETIMEDOUT',
code: 'ECONNECTION',
syscall: 'connect',
address: '74.125.203.108',
port: 465,
command: 'CONN'
node.js node-modules
I want to send email via Gmail or other email provider like office 365 using Nodemailer as my module Node.js.
I wanna ask also if there's a proxy or firewall setting to disable so that I can send email using gmail or office 365.
Or maybe there is something wrong with my code ?
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
function sendEmail(to, subject, html)
nodemailer.createTestAccount((err, account) =>
let transporter = nodemailer.createTransport(
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth:
user: 'philip@gmail.com',
pass: 'sercretpass'
);
let mailOptions =
from: '"Admin" ',
to: to,
subject: subject,
html: html
;
transporter.sendMail(mailOptions, (error, info) =>
if (error)
console.log('Error', error);
else
console.log('Success', info);
);
);
module.exports.sendEmail = sendEmail;
MY ERROR :
Error Error: connect ETIMEDOUT 74.125.203.108:465
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1121:14)
errno: 'ETIMEDOUT',
code: 'ECONNECTION',
syscall: 'connect',
address: '74.125.203.108',
port: 465,
command: 'CONN'
node.js node-modules
node.js node-modules
edited Mar 28 at 3:40
Lep
asked Mar 28 at 3:19
LepLep
84 bronze badges
84 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Are you able to telnet to smtp.gmail.com from the machine on port 465 ?
Also try with Port 587, with 587, you should see some other error as it works on STARTTLS.
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389662%2fim-using-nodemailer-node-js-to-send-email-via-gmail-but-im-getting-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are you able to telnet to smtp.gmail.com from the machine on port 465 ?
Also try with Port 587, with 587, you should see some other error as it works on STARTTLS.
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
add a comment |
Are you able to telnet to smtp.gmail.com from the machine on port 465 ?
Also try with Port 587, with 587, you should see some other error as it works on STARTTLS.
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
add a comment |
Are you able to telnet to smtp.gmail.com from the machine on port 465 ?
Also try with Port 587, with 587, you should see some other error as it works on STARTTLS.
Are you able to telnet to smtp.gmail.com from the machine on port 465 ?
Also try with Port 587, with 587, you should see some other error as it works on STARTTLS.
answered Mar 28 at 4:12
James DeanJames Dean
1,4521 gold badge2 silver badges7 bronze badges
1,4521 gold badge2 silver badges7 bronze badges
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
add a comment |
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
The same error I got but port is 587 and ip is different,.
– Lep
Mar 28 at 4:38
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
I also successfully ping the ip address I got from the host. I'm getting loss now I don't know if I need to check proxy or firewall setting.
– Lep
Mar 28 at 4:46
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389662%2fim-using-nodemailer-node-js-to-send-email-via-gmail-but-im-getting-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown