Email Delivery System

Efficient, Scalable, and Reliable Email Queue Management with AWS SQS + Node.js

πŸ”§ Technologies Used

Node.js Express.js AWS SQS Nodemailer MongoDB

πŸ“¦ System Overview

This email delivery system is built to queue, process, and send transactional emails reliably using AWS SQS and Nodemailer. It handles load efficiently, decouples send operations, and ensures delivery even under high volumes.

βš™οΈ Key Features

πŸ“ Folder Structure

└── πŸ“src
    └── πŸ“config
        └── aws.js
        └── database.js
        └── email.js
    └── πŸ“controllers
        └── emailController.js
    └── πŸ“middlewares
        └── errorHandler.js
    └── πŸ“models
        └── emailLogs.js
    └── πŸ“public
        └── index.html
        └── sendMail.html
    └── πŸ“routes
        └── emailRoutes.js
    └── πŸ“services
        └── emailLogService.js
        └── emailService.js
        └── sqsConsumer.js
        └── sqsProducer.js
    └── πŸ“utils
        └── constants.js
    └── app.js
    └── consumer.js

πŸš€ How It Works

  1. API receives email request and pushes it to the SQS queue
  2. Consumer reads the queue and sends email using SMTP/Nodemailer
  3. Status and failures are logged; retries can be managed

πŸ“« Example Payload

{
  "to": "user@example.com",
  "subject": "Welcome to Our Platform",
  "html": "

Thanks for signing up!

", "body": "Thanks for signing up!", "cc": ["cc@example.com"], "bcc": ["bcc@example.com"], "attachment": ["https://example.com/file.pdf"] }

πŸ“§ Send an Email

πŸ‘¨β€πŸ’» Developed By

Shivam Kumar – Full-Stack Developer at AAA2 Innovate Pvt. Ltd

Email: shivamraj6136@gmail.com