Learn how to send your first email using Nodemailer with SMTP.
npm install nodemailer
smtp.resend.com
465
resend
YOUR_API_KEY
import nodemailer from 'nodemailer'; async function main() { const transporter = nodemailer.createTransport({ host: 'smtp.resend.com', secure: true, port: 465, auth: { user: 'resend', pass: 're_xxxxxxxxx', }, }); const info = await transporter.sendMail({ from: 'onboarding@resend.dev', to: 'delivered@resend.dev', subject: 'Hello World', html: '<strong>It works!</strong>', }); console.log('Message sent: %s', info.messageId); } main().catch(console.error);
Was this page helpful?