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
8
votes
3 answers

Nodemailer: response: '535-5.7.8 Username and Password not accepted

With the shut down of Less secure apps by Google on May 30, 2022, using Gmail with nodemailer now throws an error that says response: '535-5.7.8 Username and Password not accepted. Learn more at\n' + '535 5.7.8 …
Nugget
  • 81
  • 1
  • 6
  • 23
8
votes
4 answers

Unable to find Less Secure Apps setting

We used our Gmail credentials in Nodemailer to send test emails in development. We tried sending one today with the same configuration as yesterday and received the following error: 2020-05-04T10:17:35.547Z Error: Invalid login: 535-5.7.8 Username…
cross19xx
  • 3,170
  • 1
  • 25
  • 40
8
votes
1 answer

How to send an email in bcc using Nodemailer

Let us say I want to send an email to recipient@xyz.com with bcc copy sent to bcc@xyz.com. When bcc@xyz.com is receiving an email he should see recipient@xyz.com in the To field, and bcc@xyz.com in the bcc field. But when bcc@xyz.com receives the…
Soham Lawar
  • 1,165
  • 1
  • 12
  • 20
8
votes
1 answer

Loopback Email Connector not sending emails

I have a Loopback Application with a REST API. I want to make a REST API Enpoint /Email/sendEmail which sends an email. I did this tutorial: https://loopback.io/doc/en/lb3/Email-connector.html, but it's not working for me somehow. When I open…
BlockchainProgrammer
  • 1,999
  • 5
  • 20
  • 32
8
votes
5 answers

Node Mailer Error

I am using nodemailer in my Firebase Cloud Functions to send a mail when a data is added to the realtime database. Code: const functions = require('firebase-functions'); const nodemailer = require('nodemailer'); const gmailEmail =…
8
votes
2 answers

Error: "Cannot find module" while running firebase cloud function

const functions = require('firebase-functions'); var nodemailer = require('nodemailer'); // const express=require('express'); var…
8
votes
2 answers

app to mail form data to my inbox doesn't work correctly on Firebase

I think I'm missing something very simple here. I have a simple, one page node.js app that uses nodemailer to email any form data to my inbox. My index.js file: var express = require('express'); var app = express(); var bodyParser =…
user7548189
  • 996
  • 6
  • 15
  • 30
8
votes
2 answers

nodemailer error: self signed certificate in certificate chain

I googled this but could not find an answer for my problem. here is my code var xoauth2 = require('xoauth2'); var transporter = nodemailer.createTransport({ service: "Gmail", auth: { xoauth2: xoauth2.createXOAuth2Generator({ user:…
dg2903
  • 613
  • 6
  • 12
8
votes
1 answer

How to use handlebars with nodemailer to send email?

I am using nodemailer to send emails using the following nodemailer-express-handlebars plugin. I used this {dead blog post} as reference The code is compiling the welcome template but is not using the layout My code is as below: var nodemailer =…
Masade
  • 715
  • 1
  • 11
  • 29
8
votes
2 answers

Can't resolve dns and child_process when using Nodemailer and Webpack

I'm trying to send a simple email using nodemailer, but am getting the following issues. It seems like the issue is with webpack. I've included the error and the code in question. Thanks! Console log: ERROR in…
JacobB
  • 324
  • 1
  • 3
  • 10
8
votes
3 answers

NodeMailer - send mail with Google service account fails because "Username and Password not accepted"

I'm creating a Twitter bot and I'm implementing a method that sends me a email if there is an error. As I'm already using the google API to access Google Drive (have no problem here), I decided to use the service account to send the email (Google…
lartkma
  • 589
  • 1
  • 5
  • 15
8
votes
8 answers

Send email using Nodemailer with GoDaddy hosted email

I am trying to send an email using nodemailer and a custom email address configured through GoDaddy. Here is a screen shot of the "custom configurations" page in c-panel: and my code: const nodemailer = require('nodemailer'); var transporter =…
Dustin Spengler
  • 5,478
  • 4
  • 28
  • 36
8
votes
0 answers

How to enable error In Nodemailer if email is not exist

nodemailer : "^2.4.2" I am sending mail using nodemailer. It's working fine. But while using not existing email, I am not getting any error: I have code as; exports.sendMail = function (req, resp, reqBody, callback) { var smtpTransport =…
Sawan Kumar
  • 327
  • 1
  • 5
  • 13
8
votes
2 answers

NodeMailer : getaddrinfo Error

Looking for some insight into an error I'm getting. on transporter.sendmail(func(err, info){}), the err variable returns this: { [Error: getaddrinfo ENOTFOUND smtp.gmail.com] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo', …
Token
  • 81
  • 1
  • 5
8
votes
3 answers

Sending emails with nodemailer

I'm trying to send emails from my application using nodemailer. My setup look like this: var nodemailer = require('nodemailer'); var smtpTransport = require('nodemailer-smtp-transport'); var transporter = nodemailer.createTransport(smtpTransport ({ …
Backer
  • 1,094
  • 1
  • 20
  • 33