Questions tagged [nodemailer]

Easy to use module to send e-mails with Node.JS

Nodemailer is an easy to use module to send e-mails with Node.JS (using SMTP or sendmail or Amazon SES) and is unicode friendly.

Nodemailer is Windows friendly, you can install it with npm on Windows just like any other module, there are no compiled dependencies. Use it from Azure or from your Windows box hassle free.

Installation:-

Install through NPM

npm install nodemailer

Useful Links:

2466 questions
4
votes
3 answers

Sending email from nodemailer for nodejs

When I try to send email from nodemailer I get an error: EAUTH API I've tried to use both Hotmail and Gmail as my services as I understand from the documentation that if Gmail doesn't work, don't use it. However this does not appear to be the…
stevenpcurtis
  • 1,907
  • 3
  • 21
  • 47
4
votes
0 answers

How to fix net::ERR_EMPTY_RESPONSE for POST request on React/Node app

I tried other solutions but still no luck. I'm adding a simple contact form on my React/Node app using Nodemailer. I'm using Heroku to deploy the app and currently testing on my local server. Although a message is delivered to the assigned mailbox,…
arataK
  • 41
  • 3
4
votes
4 answers

Unable to send email via nodemailer in nodejs

I using below configuration for sending an email via Nodemailer but unable to send it and it is thrown error: getaddrinfo ENOTFOUND ssl://smtp.googlemail.com ssl://smtp.googlemail.com:587 at GetAddrInfoReqWrap.onlookup Configuration: host:…
Kamlesh
  • 654
  • 8
  • 21
4
votes
1 answer

Reading file from MongoDB GridFS on Server Side in NodeJS Application

I want to read file from MongoDB GridFs and attach it to mail sent from node mailer. So I need to read this file at server side, what this means is I do not have access to http request or response object and I can not pipe the read stream to…
Jeet
  • 5,569
  • 8
  • 43
  • 75
4
votes
1 answer

Nodemailor can't sending emails on cross domains

I am using nodemailor for sending emails with node and express application. issues : when i am sending emails on cross domain for ex : i am using hostgator email server it was sending email on hosted emails only with hostgator , but while i am…
Bhagvat Lande
  • 1,392
  • 3
  • 17
  • 34
4
votes
7 answers

Nodemailer 6.1.1 not working with NodeJs >=12

I'm having a behaviour with nodemailer when updated my nodejs version to 12. Now, when I'm trying to send emails, I get: DEBUG Creating transport: nodemailer (6.1.1; +https://nodemailer.com/; SMTP/6.1.1[client:6.1.1]) DEBUG Sending mail using…
robe007
  • 3,523
  • 4
  • 33
  • 59
4
votes
1 answer

What does ESOCKET error mean when I'm trying to send an email?

I'm trying to send an email using nodemailer. In my LAN there is a SMTP server listening on port 25. If I use telnet, it works fine. My js script is: this.transporter.sendMail(mailOptions, function (error, info) { if (error) { …
Domenico Ventura
  • 79
  • 1
  • 1
  • 9
4
votes
3 answers

How to add a space between camel case key name?

I've created a node.js website that potential employees can apply for a job through. When they submit the application form I am using nodemailer and mailgun to send an email to the hiring manager with the applicants information. It sends the object…
klaurtar
  • 233
  • 3
  • 23
4
votes
4 answers

Setting the from name with nodemailer and sestransport

I am sending emails from NodeJS using Nodemailer and sestransport on AWS, and am wondering how I can change the 'from name'? fFr example, for from I put const mailOptions = { from: '', to: …
user1709076
  • 2,538
  • 9
  • 38
  • 59
4
votes
2 answers

Styling NodeMailer Email

Below I have referenced an example from the NodeMailer package in NodeJS. It is designed to automate email sending. As you can see, in the mailOptions object, you are able to write HTML into the message body. This is an awesome feature that I plan…
Hysii
  • 702
  • 2
  • 10
  • 23
4
votes
3 answers

Nodemailer error while using gmail in firebase functions

I am using firebase cloud functions. I have the following setup configured. While that is working completely fine on my local machine, It's giving me an issue when run on the servers. I have tried gazillion work arounds on the internet but no luck.…
Aakash Dave
  • 866
  • 1
  • 15
  • 30
4
votes
4 answers

Nodemailer - dynamic transporter

I'm creating a nodemailer on my app, and I want to send email dynamically from input field that user will fill up. E.g. If the user writes on form input email value: 'test@test.com' I want to send this email from 'test@test.com' so later I can…
Freestyle09
  • 4,894
  • 8
  • 52
  • 83
4
votes
2 answers

Nodemailer and GMail OAuth: Username and Password not accepted

So i have the following codes: const nodemailer = require("nodemailer"); const mailer = { service: "gmail", auth: { type: "OAuth2", user: "mailtester123123123@gmail.com", clientId:…
Hans Yulian
  • 1,080
  • 8
  • 26
4
votes
1 answer

Using nodemailer and smtp send mail without authentication

Below is my code. This works fine with gmail smtp server. But when I use my office one (which does not require authentication) it fails May be the syntax I am using is wrong. below is the code working with gmail smtp: var mailOptions = { …
Subh
  • 41
  • 1
  • 1
  • 4
4
votes
0 answers

NodeMailer - SMTP Transport connection Pooling

From the following documentation : https://nodemailer.com/smtp/pooled/ , It looks like by default the NodeMailer will not use a connection pool by default. Hence Transporter.Close() is not required unless pooling is used. Without pooling, a new…
Rajaram Nayak
  • 153
  • 1
  • 4