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
2 answers

How can I delete a file after I have sent it by email?

Right now Im working with Node JS using PDFKit to generate PDF files, I want to delete the file after sent it by email using Nodemailer, here is my code: reportcontroller.sendrecordsemail = async (req,res)=>{ try{ const doc = new PDF({ …
0
votes
1 answer

Nodemailer throws "No recipients defined" error but email is actually sent

I am experiencing an unexpected behaviour from nodemailer: here is my code: let transporter = nodemailer.createTransport({ host: 'outlook.office365.com', auth: { user: process.env.MAIL_USER, // generated ethereal user pass:…
0
votes
1 answer

Error: connect ECONNREFUSED Nodemailer Ethereal

I have an error when trying to use the example from nodemailer. I modified it a little bit but it has all of the same core. When I try to run it I get this error: Error: connect ECONNREFUSED 13.49.22.0:587 at TCPConnectWrap.afterConnect [as…
mteam88
  • 103
  • 1
  • 12
0
votes
1 answer

Node JS : Express JS : Formidable : Nodemailer - How can i upload a html template on contact form and send it using Nodemailer?

I have a contact form and i want to upload a html template using the input file and send it with Nodemailer. I have used formidable to get a temporary path but im not able to pass this parameter to the HTML tag of sendMail. How can i archive this…
Astrit Shuli
  • 619
  • 4
  • 20
0
votes
1 answer

Retry mechanism to send an email from different host

I'm sending an email using nodemailer and in case a send is faild, I wanna use a different host in a retry. I tried: let tries = 0; let maxTries = 2; const sendEmail = async () => { tries += 1; if (tries === maxTries) return; …
flow24
  • 793
  • 2
  • 5
  • 17
0
votes
0 answers

Resend file from request

I have an app on React. There is a form and it sends only texts fields to node js server. Server resend info from request body to email using nodemailer. Now I want to attach a file. And file should resend to email too. How can I do it? How can I…
Mo J
  • 93
  • 7
0
votes
2 answers

nodemailer + nestjs + @nestjs-modules/mailer not working with aws ses, giving `Error: Unexpected socket close` error

I am using AWS SES for SMTP credentials and this nestjs module @nestjs-modules/mailerit was working 4/5 days ago but suddenly, what happened I am pretty sure that my credentials are right. Error: Unexpected socket close at Timeout._onTimeout …
0
votes
0 answers

Nodemailer - "error":"TypeError: Cannot assign to read only property 'to' of object '#'"
I tried everything but nothing works. Everything ends up in the same place. "typescript": "^4.6.2" node version: v16.14.2
0
votes
1 answer

Node.js/React Form submission

So I've built a contact form on my site and my form wont submit. both ports 5000 and 8080 wont work. I'm using Node.js, Express, nodemailer, and cors. I have tried various things already, such as different ports, making sure ports are open, changing…
0
votes
0 answers

Nodemailer is only sending emails for gmail

i'm using Oauth2 and nodemailer to send emails using nodejs. when i send the email to a gmail email ex: example@gmail.com everything is working fine, but when i try to send the email to a hotmail email ex: example@hotmail.com, it's returning for me…
petra
  • 29
  • 6
0
votes
0 answers

Creating a email service in node.js

I am trying to create email scheduling service for the user in a MERN stack application. I am using nodemailer for the emailing service. But I requires enabling "access to less secured apps" in google account settings. The users will not feel safe…
Sai Charan
  • 31
  • 6
0
votes
2 answers

user email verification using nodemailer

I am doing the user email verification in node js using nodemailer my code is below. // Create new User const createUser = async function (req, res) { // Check if this user already exisits. let user = await User.findOne({ email:…
Calypso
  • 21
  • 3
  • 6
0
votes
0 answers

I tried to send email using Nodemailer in serverless lambda REST API

this email function perfectly work in localhost but it doesn't work in lambda function. const transporter = nodemailer.createTransport( smtpTransport({ service: "Gmail", host: "smtp.gmail.com", auth: { user: "abc@gmail.com", pass:…
Irushan
  • 125
  • 2
  • 10
0
votes
2 answers

Using Nodemailer - Email is sent but not recieved

I am using a custom email on a custom domain and trying to send emails to clients. On the node side the response shows the email is sent but can't see it on the reciever's input box. var transporter = nodemailer.createTransport({ host:…
Madhu Paka
  • 51
  • 6
0
votes
1 answer

Nodemailer - How to send OTP using Nodemailer in React JS?

Hello Community I am stuck at one point. I want to develop on functionality in this functionality when we call email send route it will also send the OTP. I am developed two functions one is for email send and one is for nodemailer. Email sent…
David Smith
  • 29
  • 1
  • 7
1 2 3
99
100