You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export { email };
Here inside of password i have used my app password form google which is of 16 digit and this is the error
Error: Error: Missing credentials for "PLAIN"
at SMTPConnection._formatError (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:798:19)
at SMTPConnection.login (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:452:38)
at /home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-transport/index.js:272:32
at SMTPConnection. (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:215:17)
at Object.onceWrapper (node:events:633:28)
at SMTPConnection.emit (node:events:519:28)
at SMTPConnection._actionEHLO (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:1360:14)
at SMTPConnection._processResponse (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:982:20)
at SMTPConnection._onData (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:763:14)
at SMTPConnection._onSocketData (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:195:44) {
code: 'EAUTH',
command: 'API'
}
here is my .env file email id emailForNodemailer='xrobo17@gmail.com'
The text was updated successfully, but these errors were encountered:
I am trying to send a email but its showing me a error this is my code
import nodemailer from 'nodemailer';
const transporter = nodemailer.createTransport({
service: "gmail",
host: "smtp.gmail.com",
port: 587,
secure: false,
auth: {
user: process.env.emailForNodemailer,
pass: process.env.passwordForNodeMailer
}
});
var mailOptions = {
from: 'xrobo17@gmail.com',
to: 'akshatmalik18t@gmail.com',
subject: 'Sending Email using Node.js',
text: 'That was easy!'
};
function email() {
transporter.sendMail(mailOptions, function(err, res) {
console.log("Error:", err);
console.log("Response:", res);
});
}
export { email };
Here inside of password i have used my app password form google which is of 16 digit and this is the error
Error: Error: Missing credentials for "PLAIN"
at SMTPConnection._formatError (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:798:19)
at SMTPConnection.login (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:452:38)
at /home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-transport/index.js:272:32
at SMTPConnection. (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:215:17)
at Object.onceWrapper (node:events:633:28)
at SMTPConnection.emit (node:events:519:28)
at SMTPConnection._actionEHLO (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:1360:14)
at SMTPConnection._processResponse (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:982:20)
at SMTPConnection._onData (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:763:14)
at SMTPConnection._onSocketData (/home/king/Desktop/http/server/node_modules/nodemailer/lib/smtp-connection/index.js:195:44) {
code: 'EAUTH',
command: 'API'
}
here is my .env file email id emailForNodemailer='xrobo17@gmail.com'
The text was updated successfully, but these errors were encountered: