DEV Community

Discussion on: How to send email in Node.js with Nodemailer

Collapse
 
alexanderjanke profile image
Alex Janke

Highly recommended to also verify your transporter. This tests your connection and authentication before actually sending mails.

// verify connection configuration
transporter.verify(function(error, success) {
  if (error) {
    console.log(error);
  } else {
    console.log("Server is ready to take our messages");
  }
});
Enter fullscreen mode Exit fullscreen mode
Collapse
 
siddharth151199 profile image
siddharth

ohhh,I will add this soon.Thank you so much !🤗