To send an email, use the sendMail method: const mailOptions = { from: 'your-email@gmail.com', to: 'recipient-email@gmail.com', subject: 'Email Subject', text: 'Email Body' };
transporter.sendMail(mailOptions, function(error, info){ if (error) { console.log(error); } else { console.log('Email sent: ' + info.response); } }); The mailOptions object contains the email details such as sender, recipient, subject, and body.