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
0
votes
0 answers

Failed to load PDF document once sent by nodemailer attachments

The email and attachment is successfully sent but the attachment failed to be opened/read! Here is the code : let str = Buffer.from("Hello World").toString('base64') console.log("str",str) //HelloWorlQ== let info = await transporter.sendMail({ …
Bobox
  • 21
  • 1
  • 7
0
votes
2 answers

Nodemailer stopped sending emails EHLO/HELO

Last week nodemailer stopped working on a number of scripts I run as scheduled tasks on a windows 10 pc. After updating nodejs and nodemailer, switching off the firewall, and trying on another pc, I still cannot get nodemailer to send emails. I have…
Kevin
  • 229
  • 1
  • 4
  • 12
0
votes
0 answers

Google OAuth using nodejs - Not able to proceed with email sending

I am trying to send mail using OAuth2.0 from my gmail tp the user mail for confirming registration. The below is my code. There is no error. But no output also. I dont have complete understanding of the code. Somehow I managed to construct them by…
sabari
  • 2,595
  • 5
  • 28
  • 44
0
votes
0 answers

Multiple errors when importing nodemailer in nextjs API

I am trying to have an API endpoint pages/api/sendEmail that uses nodemailer to send an email, but for some reason I get the error Can't resolve 'fs' when I try to use nodemailer with let nodemailer = require('nodemailer'). I have seen multiple…
nicase
  • 106
  • 1
  • 4
0
votes
0 answers

Workable links through Nodemailer from my GitHub codespace? The email is sent but when clicking the link, the page comes up blank

Using GitHub and need to send users to an html page but when users click on link, no content is shown. This is my code The link is -> My GitHub link + hostName + ":8080/page.html" The hostName is : var hostName = require('os').hostname(); Any idea…
0
votes
0 answers

Nodemailer- connect ECONNREFUSED 127.0.0.1:587

I'm trying sending emails using node mailer but I'm getting the error Error: connect ECONNREFUSED 127.0.0.1:587 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) { errno: -4078, code: 'ESOCKET', syscall: 'connect', address:…
Ali Nawaz
  • 43
  • 1
  • 7
0
votes
1 answer

nodemailer with mailhog using docker

Trying to send mail using nodemailer, got "outside" as an answer (means mail was not sent). No error, or anything that can be catched index.js app.get('/test', async (req, res) => { const email = require("./core/email"); var mail = new…
IGentlich
  • 81
  • 2
  • 13
0
votes
1 answer

nodemailer online.net 550-HELO can't be [127.0.0.1]. Please contact your ISP

I have a problem on sending mails online.net with nodemailer. While it works fine with chilkat's mailman module (node.js) on the same environment nodemailer version let transporter = nodemailer.createTransport({ host: "smtpauth.online.net", …
Yan
  • 11
  • 1
0
votes
1 answer

nodemailer custom host without authentication

I have a custom smtp host that doesn't require any authentication (internal use only, need to be on a VPN) and I'm unable to get it working with NodeMailer. Currently I'm doing const nodemailer = require("nodemailer"); let transporter =…
AndyReifman
  • 1,459
  • 4
  • 18
  • 34
0
votes
0 answers

Undefined return when send email using nodemailer package

I am trying to send email with javascript nodemailer package but returning undefined. Checked following options: Less app secured is ON No 2 Factor enabled enabled https://accounts.google.com/DisplayUnlockCaptcha Let me know what is missing ? I…
user19089852
  • 143
  • 1
  • 7
0
votes
0 answers

nodemailer problem. Hello. Nodemailler works locally. However, I am getting the following errors on the host

(node:1964005) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id:…
0
votes
0 answers

How to attach images to email in next js using nodemailer

I'm trying to attach images to an email to display them later. I'm using NextJS and I'm doing that using the serverless functions. const letter: any = { from: 'ME', replyTo: 'ME', to: `<${email}>`, subject: "subject", text, …
Likepineapple
  • 486
  • 1
  • 4
  • 13
0
votes
0 answers

Firebase Function Error "Client network socket disconnected before secure TLS connection was established" when sending bulk emails via Nodemailer

I am sending bulk emails from Firebase HTTP Request using Nodemailer. Some of the emails are always missed out and it returns with this error: Client network socket disconnected before secure TLS connection was established Here is my code for…
0
votes
2 answers

Trying to send email with Nodemailer and Twilio Sendgrid with normal auth (not Oauth2). SendMessage() fails with Error: Missing credentials for PLAIN

I am attempting to send an email using Nodemailer and Twilio Sendgrid, following the tutorial here. As far as I can tell I am following the instructions in the tutorial, as well as theNodemailer and Sendgrid documentation. Every time this method is…
0
votes
0 answers

How to allow heroku send emails to me?

So I have my website deployed on heroku and one of the functionalities is that it can send mails to me, but google has alot of protocols, I had to enable my CAPTCHA and even turn on my less secure app in my Gmail settings, but from time to time…