UNPKG

nodemail-aws-ses

Version:

nodemail-aws-ses is a Node.js package that provides a simple and easy way to send emails using Amazon SES (Simple Email Service). It provides an EmailSender class that takes care of sending emails using the AWS SDK, with options for both HTML and text ema

19 lines (15 loc) 503 B
const EmailSender = require("../EmailSender"); require("dotenv").config({ path: "./.env" }); const to = "rakethost@gmail.com"; const subject = "Welcome to My App"; const textBody = "Thank you for signing up!"; const htmlBody = "<h1>Thank you for signing up!</h1>"; const emailSender = new EmailSender(to, subject, textBody, htmlBody); emailSender .send() .then(() => { console.log("Email sent successfully"); }) .catch((error) => { console.error("Error sending email:", error); });