Sign inSign up

justmediapl/mailmock

By justmediapl

•Updated 4 days ago

MailMock is a mock email service that simulates SMTP server without actual delivery.

Image
Developer tools
0

2.1K

justmediapl/mailmock repository overview

⁠MailMock

MailMock is a mock email service that simulates sending and receiving emails without actual delivery. It is designed for development, testing, and debugging email workflows in a safe and controlled environment. With MailMock, you can validate email content, test email templates, and ensure your email features work as expected without using real email services.

⁠Features

  • Mock Email Sending: Simulate email sending using SMTP without external providers.
  • Web Interface: Easily manage and view mock emails through a user-friendly interface.
  • API Integration: Send and retrieve mock emails using MailMock's API (see swagger-ui/index.html)
  • SMTP Support: Works with any SMTP client to simulate email functionality.
  • No Real Email Delivery: Perfect for testing email workflows and debugging email-related issues.
  • **In memory storage
  • **Support for MongoDB
  • **Chaos Mode: Simulate random SMTP errors for testing edge cases

⁠Getting Started

⁠Docker Installation
  1. Pull the Docker Image:

    docker pull justmediapl/mailmock
    
  2. Run MailMock in Docker:

    docker run -d -p 8025:8080 -p 1125:1125 justmediapl/mailmock
    
  3. Access the Web Interface:

⁠Basic Configuration:
  • SMTP Server: localhost
  • SMTP Port: 1125 Username/Password: Not required
⁠Additional configuration:

You can use additional configuration via ENV variables:

  • APP_PORT: Port for the server to listen on (default is 8080).
  • MONGO_USER: MongoDB username for authentication (default is smtp).
  • MONGO_PASS: MongoDB password for authentication (default is smtp).
  • MONGO_DB: MongoDB database name (default is smtp).
  • MONGO_PORT: MongoDB port (default is 27017).
  • MONGO_HOST: MongoDB host (default is localhost).
  • SMTP_PORT: SMTP port for the MailMock service (default is 1125).
  • MESSAGES_LIMIT: The oldest messages are automatically removed to keep your workspace clean when the limit is reached(default is 500).
  • DB_ENGINE: Database engine used (options: mongo, inMemory, default is inMemory).
  • CHAOS_MODE_ENABLED: enables chaos engine to generate random SMTP errors (default true)
  • CHAOS_MODE_LATENCY: accepted messages between simulated errors (default 5)

⁠Example Use Case

  1. Configure your application or email client to send emails via the localhost SMTP server.
  2. Visit the MailMock web interface at http://localhost:8025⁠ to view the emails that were sent.
  3. Use the MailMock API to interact programmatically with mock emails and verify the email content.

For more information, visit MailMock Website⁠.

Tag summary

Content type

Image

Digest

sha256:ea6f16614…

Size

148.7 MB

Last updated

4 days ago

docker pull justmediapl/mailmock