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

Nodemailer keeps giving me an error: "TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or..."

The full error is EXTREMELY long, but here is a snippet: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object at PassThrough.Writable.write…
HappyPanda
  • 97
  • 1
  • 8
5
votes
3 answers

Gmail blocks Nodemailer from sending mail

I am working on deploying my Node.js app. However I am having issues with having the registration email getting sent out. const transporter = nodemailer.createTransport({ service: 'Gmail', auth: { user: GMAIL_USER, pass:…
5
votes
0 answers

Nodemailer error: Cannot use 'in' operator to search for 'contentTransferEncoding'

I'm trying to send a POST request from Unity to my web service endpoint in Node.js; I'm able to send emails without adding any attachments. But, when I try to send an array of attachments I always get this error. Error: Cannot use 'in' operator to…
5
votes
1 answer

Node PDFKit pipe to multiple targets

I'm having a problem, when I have to pipe() the created document to multiple targets, in my case to a HTTP response and to an email attachment using node-mailer. After the first use in an attachment to an email, nothing gets piped to a response…
AndrejH
  • 2,028
  • 1
  • 11
  • 23
5
votes
1 answer

432 4.3.2 STOREDRV.ClientSubmit; sender thread limit exceeded?

I tried to upload an excel sheet which contains 1000 user records. I tried to send a temporary password to these users, in some cases it succeedded and in other cases i I got the error 432 4.3.2 STOREDRV.ClientSubmit; sender thread limit…
Ramakrishnan
  • 61
  • 1
  • 2
  • 11
5
votes
1 answer

nodemailer is causing an error in production environment on Aws Ec2

I am sending emails using nodemailer using node.js and i have this configuration to send emails var transporter = nodemailer.createTransport({ service: 'gmail', host: 'smtp.gmail.com', auth: { …
Fahad Subzwari
  • 2,109
  • 3
  • 24
  • 52
5
votes
1 answer

Using nodemailer with different email providers

I'm using nodemailer to send emails from my web app. I already send emails from one gmail account to another gmail account using "service: 'gmail'". const nodemailer = require("nodemailer"); const promisify = require("es6-promisify"); const…
עדי קוש
  • 63
  • 2
  • 9
5
votes
2 answers

nodemailer fails with connection refused, using known good SMTP server

I have a mail server setup and working (dockerized dovecot/postfix on Linode, using the tvial docker image) - I can send and receive mail from both roundcube and the mail client on my macbook. But setting up nodemailer with the same SMTP server and…
svenyonson
  • 1,815
  • 1
  • 21
  • 30
5
votes
1 answer

how to execute js script file as child process node.js

I have a problem, I'm trying to execute file that sending mail using nodemailer and I need to execute it from another JS file I tried to do it like this: const exec = require('child_process').exec; …
5
votes
4 answers

Gmail API 'invalid username or password' when using OAuth2 in nodemailer

I'm trying to use gmail smtp with the latest version of nodemailer. I've done the steps that are described here. When sending a mail I still get the following errormessage: Error: Invalid login: 535-5.7.8 Username and Password not accepted It's…
JC97
  • 1,530
  • 2
  • 23
  • 44
5
votes
2 answers

NodeMailer - Cannot read property 'getSocket' of undefined

Node: v8.6.0 Nodemailer: v4.6.4 This is my code: const transport = nodemailer.createTransport({ host: process.env.MAIL_HOST, port: process.env.MAIL_PORT, auth: { user: process.env.MAIL_USER, pass: process.env.MAIL_PASS } }); const…
aazcast
  • 88
  • 5
5
votes
3 answers

Nodemailer - Error: Missing credentials for "PLAIN" at SMTPConnection._formatError

I'm trying to get my hands dirty with Nodemailer and I am getting the above error message. If I set up my email address and password as plain text then the app works fine, obviously I would rather not do that as I will be pushing to Github, so I…
Kieran
  • 51
  • 1
  • 3
5
votes
3 answers

How to get nodemailer to work with 2LO for service accounts?

I have followed the instructions on the nodemailer site to the letter, but OAuth2 for google service accounts simply does not work for me. Either I get ECONN timeouts when setting "host" to mail.google.com or some combination of "401, user/pwd not…
5
votes
1 answer

Send email with Angular and NodeMailer

how is it going? I am trying to figure out how to send an email with Angular 5 and Node.js -using nodemailer-. What I want to archive is when some user make an appointment in the page and system gets the provided email and send some information to…
5
votes
1 answer

Invalid greeting from server: * OK The Microsoft Exchange IMAP4 service is ready

The issue resides when trying to get incoming emails from the server side. I simply get the error message Invalid greeting from server. Any help would be appreciated. const mailTransportTwo = nodemailer.createTransport({ host:…
Mark Miller
  • 51
  • 1
  • 4