Skip to content

An extended development playground derived from srnjak-dev-playground, tailored for seamless email testing using Postfix and Mailutils in a containerized environment. Easily configurable with environment variables for flexible email setup during development and testing.

License

Notifications You must be signed in to change notification settings

srnjak/srnjak-dev-playground-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srnjak-dev-playground-mail Docker Image

This Docker image is an extension of the srnjak-dev-playground image, providing additional support for sending emails from the bash console using Postfix and Mailutils.

Usage

Building the Image

docker build -t srnjak-dev-playground-mail .

Running a Container

To run the container, you can use either the --env-file option or the -e flag to specify environment variables directly. Below are examples for both methods:

Using --env-file:

docker run --env-file env.list -it srnjak-dev-playground-mail

Ensure that you have an env.list file containing the necessary environment variables for email configuration, including RELAY_HOST, USERNAME, and PASSWORD. Here is an example env.list file:

RELAY_HOST="[mail.example.com]:465"
USERNAME="your_username"
PASSWORD="your_password"

Using -e:

docker run -e RELAY_HOST="[mail.example.com]:465" -e USERNAME="your_username" -e PASSWORD="your_password" -it srnjak-dev-playground-mail

Replace the values in quotes with your specific configuration details.

Sending a Test Email

Once the container is running, you can send a test email using the following command:

echo "Test message" | mail -s "Test" -a "From: sender@example.com" recipient@example.com

Replace recipient@example.com with the desired recipient's email address, and update the "From: sender@example.com" to specify the desired sender's email address.

Dependencies

  • Based on the srnjak-dev-playground image
  • Postfix
  • Mailutils

Docker Hub

The Docker image is available on Docker Hub:

License

This Docker image is licensed under the MIT License.

About

An extended development playground derived from srnjak-dev-playground, tailored for seamless email testing using Postfix and Mailutils in a containerized environment. Easily configurable with environment variables for flexible email setup during development and testing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published