Running MailDev as a Local Mail Server with Docker
This note describes how to set up maildev: a local mail server with docker.
Setting Up MailDev with Docker
Create a Dockerfile using the example below.
FROM node:14-alpineEXPOSE 1080EXPOSE 1025RUN npm i -g maildevCMD ["maildev"]MailDev uses the following ports:
1080for the management console.1025for SMTP.
These ports can be customized using options.
Create a docker-compose.yml file with the following content:
version: '3'services: mail: container_name: mail build: ./ ports: - "1080:1080" - "1025:1025"Run the Docker container using the command below:
docker-compose up -d mailOnce the container is running, you can access the MailDev Management Console by opening your browser and navigating to http://localhost:1080.
This console provides an interface to view and manage emails sent to the MailDev server.

Testing Email Functionality
If you’re using Windows, you can send test emails using the PowerShell Send-MailMessage command. Here’s an example:
Send-MailMessage ` -from 'dev@localhost' ` -to 'dev.to@localhost' ` -subject 'Test Subject' ` -body 'This is a test email.' ` -smtpServer 'localhost' ` -port 1025After sending an email, navigate to the MailDev Management Console to verify that the email has been received.

Related posts
Building and Deploying Greengrass Components in a Dockerized Environment
Develop AWS IoT Greengrass components locally using the Greengrass Core Docker image.
Sign in with Slack Using Cognito User Pools and OIDC
This note describes how to federate Cognito user pools with Slack using OIDC to implement "Sign in with Slack".
Deploying FastAPI on AWS Lambda with Lambda Web Adapter
This example guides you through the process of developing API backends with FastAPI using Lambda Web Adapter.
API Gateway WebSocket: Implementing a Mock Integration
This note describes how to build an API Gateway WebSocket endpoint using mock integration.
Uploading to S3 Through CloudFront Pre-Signed URLs
CloudFront signed URLs let you upload to S3 through a custom domain—useful when direct S3 pre-signed URLs are not an option.
