Questions tagged [nodemailer]

1

votes
1

answer
784

Views

Error: A partials dir must be a string or config object in handlebars

I am sending templated email using nodemailer with nodemailer-express-handlebars, but whenever I am trying to send a mail, I am getting the Error: A partials dir must be a string or config object. I don't know what is the problem. const express = require('express'); const hbs = require('nodemailer-...
Rahul
1

votes
3

answer
42

Views

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 of the new applicant with the key value pairs, but...
klaurtar
1

votes
3

answer
7.1k

Views

Node.js sending an email with image attachment using nodemailer

I'm trying to send an email from a post request. I'm using Express and nodemailer. I'm confused by 'fs' My email is getting sent but the image is not included as an attachment. I checked the docs but they all seem to send up static files not files being streamed in from a form request. var smtpTrans...
PaulWoodIII
1

votes
0

answer
225

Views

How to get the status of a message sent with nodemailer that never reach the recipient?

I am trying to use nodemailer to send emails via a mail server that I own in JustHost. I am using the SMTP settings provided by the hosting. let transporter = nodemailer.createTransport({ host: 'mail.wegocuba.com', port: 465, secure: true, auth: { user: PROVIDERS.wegocuba.user, pass: PROVIDERS.wego...
Abs
1

votes
0

answer
43

Views

How to pass multiple host url's in the transport object for createTransport function in nodemailer

Is it possible to configure multiple host value with their respective ports in transport object of createTransport function of nodemailer library. Right now my code is: var transport = { host: 'devint.test.com', port: 22, auth: { user: 'test', pass: 'test' } } let transporter = no...
Reena Upadhyay
1

votes
0

answer
561

Views

Configure nodemailer to function with no-reply configured sender email account

I have the following code to send emails to my users from an account configured as a sender 'noreply account, plus I added with the following forward filter':fail: No such person at this address. ' into CPanel. However I got an error with Nodemailer, so my question is how I could use a nonreply filt...
Marcos DaSilva
1

votes
0

answer
548

Views

Angular 4 email Contact form

everyone. I'm pretty new to Angular and have been tasked to complete a 'Contact Us' form to allow customers to send emails through the web form. The HTML: Contact Us Contact us 111.222.3333 [email protected] Office 1 Our street address City, state, zip Office 2 street address City, state, zip S...
Jringwood
1

votes
1

answer
279

Views

Is it possible to set the sender address dynamically in nodemailer?

I am using nodemailer to send myself emails from a contact form as part of my application. I have it set up with SendPulse as an SMTP server. I would like to create the message like so: const transporter = nodemailer.createTransport( { service: 'SendPulse', auth: { user: '[email protected]', pass:...
Matt Gween
1

votes
2

answer
17

Views

Nodemailer gives error for incorrect user and password

Im using nodemailer for a email from a registration form. Here is my form Registration `enter code here` And in my app.js I have this app.get('/registration', function(req,res){ res.render('registration.ejs') }); app.post('/registration', function(req,res){ var transporter = nodemailer.createTransp...
dutchkillsg
1

votes
0

answer
292

Views

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 accepted, can not create access token' errors when...
Lance Massey
1

votes
0

answer
269

Views

Nodemailer - redirecting to success page

Trying to get my page to redirect from a node.js and express.js page after sending an email. The message gets sent and I am getting the console.log() in my terminal (using morgan for logging) but it's not redirecting me to the success page and I'm not getting a console.log error in the browser. It j...
dp_chua
1

votes
1

answer
535

Views

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 have set them up as environment variables as below, un...
Kieran
1

votes
0

answer
112

Views

How to attach a logger to that of nodemailer SMTPTransport class

Need to add a custom winston logger to the SMTPTransport transport class but after attaching the logger does not perform any error logging function at all. Following is an excerpt from SMTPTransport class in nodejs nodemailer util class SMTPTransport extends EventEmitter { ... this.logger = shared.g...
barry_allen
1

votes
1

answer
213

Views

how to sedn base 64 string as image in nodejs using node mailer

I have nodejs get request which need to send the base 64 string as image in the email which as shown below router.post('/sendEmailNotification', function(req, res, next){ var inlineBase64 = require('nodemailer-plugin-inline-base64'); //here i have big image let img ='/9j/4AAQSkZJRgABAQAAAQABAAD...
DhanaLaxshmi
1

votes
0

answer
95

Views

How to track if recipient click a link in email?

How to track if recipient click a link in email ?. I know we can add an endpoint on our backend to track the clicks on those links and integrate it with the sending of emails - to know which link is from which email. But in my case I have CC email. So link url will be same for all recipients. Is th...
Jennifer
1

votes
1

answer
243

Views

Sending attachments with multer

Update: What I have tried so far app.post('/jobs/join-us', upload.array(), function (req, res, next) { console.log(req.body); res.json(req.body); var form = new formidable.IncomingForm(); form.parse(req, function(err, fields, files) { // `file` is the name of the field of type `file` var old_path =...
Mikk Küttim
1

votes
0

answer
185

Views

Need email Notification service using smtp,using Nodemailer

I am trying to implement Nodemailer for sending one or bulk emails but facing trouble to handle when there is a failure in sending email for eg. Email Address not found. I need a list of these bounced emails and other such failures and insert them into the DB,after trying to send the email twice. Be...
pooja salot
1

votes
0

answer
140

Views

Authentication issue while sending mail through nodemailer via service account

What I am trying to achieve is sending a mail, through nodemailer, from my web application to the recipient via a service account. I took the reference from the following links https://developers.google.com/identity/protocols/OAuth2ServiceAccount https://gypsyshen.com/2018/03/01/secure-gmail-access...
ks_mani
1

votes
1

answer
174

Views

nodemailer calendar event invitation not working

I'm trying to send a calendar event from my gmail with nodemailer. I generate the ics string with the npm package ics. const message = { from: '...', to: [ '...', '...'], subject: 'Message title', text: 'Plaintext version of the message', html: 'HTML version of the message', icalEvent: { content: v...
Timo Jokinen
1

votes
1

answer
49

Views

Form submit displays javascript coe instead of executing it

I'm trying to create an HTML form that will send an email using the information inputed. For now however, I just hard coded the information into the script itself, so the field inputs don't matter. However, whenever I press the Submit button, is simply displays the Javascript to the screen instead o...
Joel Nash
1

votes
0

answer
35

Views

Can't correctly configure iptables for nodemailer

I stuck on an issue for send mail... I have a server running Ubuntu 16.04, and on this server, I run (with pm2) a node.js server. This server must send me an email when I ask for. That worked fine but then I configured iptables and now the nodejs server can't send mail anymore... I configured iptabl...
Steve VE
1

votes
0

answer
30

Views

Sending Mail with nodemailer and node.js

I am using this code for sending an email var transporter = nodemailer.createTransport({ host: 'smtpout.secureserver.net', secure: true, port: 465, auth: { user: mail, pass: password } }); var mailOptions = { from: mail, to: emailTo, subject: subject, headers: headers, html: html }; The problem is t...
1

votes
1

answer
44

Views

I'd like to send an email to users who subscribe to my webpage by clicking a button

pretty new here so I apologize if this question has been asked before. I have been asked to create a website that shows a series of tickets that the company's employees open regarding a problem. Problem is whenever someone opens a ticket, or updates the status of it, or comments on it, or however el...
argen mousesian
1

votes
0

answer
48

Views

Issue with requiring of nodemailer in React.js;

I am trying to send an email after registration to a user. But I am having an issue with requiring of nodemailer module. I am getting the following error: -The version of my npm is: 6.2.0 -The version of my node is: v8.11.1 -My package.json looks like this: -My function for sending email looks like...
1

votes
0

answer
53

Views

Nodemailer doesn't work in Now

When I use this configuration for Nodemailer: const transporter = nodemailer.createTransport({ service: process.env.EMAIL_SERVICE, auth: { user: process.env.EMAIL_USER, pass: process.env.EMAIL_PASSWORD } }); Variables: EMAIL_SERVICE: 'Hotmail', EMAIL_USER: '[email protected]', EMAIL_PASSWORD: 'MyP...
Andrés Montoya
1

votes
1

answer
372

Views

How to send an e-mail using mailgun/mailchimp/etc in an express/node.js app

I want to send automated e-mails like order brief, sign-in e-mail, confirm e-mail, change password e-mail, etc to clients using mailchimp or mailgun or whatever e-mail delivery server because when I used nodemailer, the clients were receiving the e-mails in their spam inbox and sometimes not receivi...
Cedric Hadjian
1

votes
0

answer
102

Views

Gmail NodeMailer Invalid Status Code 401

I am trying to use nodemailer with gmail. It was working fine, but now I am suddenly receiving the error: Invalid Status Code 401 There aren't any further details on the error. I have already refreshed the token by following the guide here, however I am still not able to solve this. Here is my node...
Sonu Kapoor
1

votes
0

answer
29

Views

nodemailer xoauth2 connect timed out error

I am currently trying to get nodemailer to work locally but I keep running into a connection timed out error. I have tried multiple other ways, or even trying other snippets of code but it hasn't been working for me. app.post('/contact/send', (req,res)=>{ let transporter = nodemailer.createTransport...
Jonny
1

votes
0

answer
101

Views

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 connection is used everytime the sendEmail() is calle...
Rajaram Nayak
1

votes
0

answer
43

Views

Implement a mailing solution in Express nodejs

I'm creating an API that handles account verification via email, password recovery and possibly other things. I want to create one place to send emails across my entire API. i'm using nodeMailer. My current setup is i'm a calling a method on the user model that send EmailVerification email. I want...
Mustapha Geribi
1

votes
1

answer
46

Views

How can I use a relative path for a nodemailer attachment?

I am using the html-pdf converter plugin to convert a HTML page to a PDF file. This plugin saves the PDF to the downloads folder. I can attach a PDF to a nodemailer email like this: attachments: [{ filename: 'transportpdf.pdf', path: '/Users/green/downloads/transportpdf.pdf', contentType: 'applicati...
greenn
1

votes
0

answer
105

Views

node-mailer send emails with dynamic 'from' email

hello is there any configurations to send emails using dynamic from emails. current code. var transporter = nodemailer.createTransport({ host: 'smtp.gmail.com', port: 587, secure: false, auth: { user: '[email protected]', pass: 'test' } }); transporter.sendMail(mailOptions, (error, info) => { if (error...
Dilakshan Sooriyanathan
1

votes
0

answer
291

Views

Sending and receiving emails using node.js server

I have to implement email server like webmail in nodeJS and angular 6. About my scenario, user needs to provide their email and email password.Then I have to identify their smtp server address and authenticate. After that user should able to send & receive email which connected to provided email. I...
Isanka Thalagala
1

votes
0

answer
258

Views

Authentication not working for Nodemailer

I've been trying all day long to get nodemailer to work with my Yahoo account. I'm getting the following authentication error now: Error: Invalid login: 535 5.7.1 Authentication failed at SMTPConnection._formatError ... code: 'EAUTH', response: '535 5.7.1 Authentication failed', responseCode: 535,...
Aaron
1

votes
0

answer
57

Views

Nodemailer - sending from different gmail accounts

On our NodeJS server, we would like to use nodemailer to send emails from multiple user accounts (those are custom accounts, so no google authentication using gmail account). We also have React application which is communicating to NodeJS server using API. Now since some functionality is based on se...
ZassX
1

votes
0

answer
77

Views

Fail to send mail from AWS-ECS container, not getting any error?

Our node application is not able to send mail from ECS cluster. Right not running docker container on ECS cluster and one of our functionality trying to send mail using 'nodemailer' node module to the users but it it not able to send mail. Here is the snippet which we are using, *const sender = 'no_...
Amol Khanorkar
1

votes
1

answer
200

Views

Send a file with a form from nuxt to node server (nodemailer)

I have a form like that in nuxt : Pic from original work (required) And my script is like that : export default { data() { return { file: '', linkOriginal: '', }; }, methods: { handleFileUpload() { console.log(this.$refs.file.files[0]); this.file = this.$refs.file.files[0]; }, submit() { if (this.$r...
yoanncooljazz
1

votes
0

answer
37

Views

Not able to send email using nodemailer

I am using react as the front end of a project and I am having trouble sending an email. We have a basic input line for an email and a button to click after typing in your email. This button then runs a function onclick that sends an email using nodemailer. I used module.export to be able to import...
Josh15642
1

votes
0

answer
181

Views

Need My angular app to connect to nodemailer

I have a website I'm building for the company I work at. It's built in Angular and I've followed instructions from the angular universal Wiki to install express and render my app on the server. The last part I have an issue with is the Contact page. I have the form set to action='/send-email' and me...
Designbysite
1

votes
1

answer
181

Views

How to send encrypted/TLS emails with NodeJS from localhost using send mail

I want to be able to send emails from my local domain without using gmail or other SMTP servers. I'm currently using SendMail: const sendmail = require('sendmail') ({ logger: { debug: console.log, info: console.info, warn: console.warn, error: console.error }, dkim: { privateKey: dkimPrivateKey, k...
orangeMint

View additional questions