docker network create mailcatcher-net
docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher --rm --network mailcatcher-net schickling/mailcatcher
sudo usermod -aG docker www-data
# php.ini
sendmail_path = /usr/bin/docker run --rm --network mailcatcher-net -i schickling/mailcatcher catchmail --smtp-ip mailcatcher --smtp-port 1025 -f [email protected]
# test in bash
echo "Subject: sendmail test" | docker run --rm --network mailcatcher-net schickling/mailcatcher catchmail --smtp-ip mailcatcher --smtp-port 1025 -f [email protected] [email protected]
# test in PHP CLI `php -a`
print_r(mail('[email protected]', 'Testing CLI mail', time()));
Created
April 12, 2020 08:44
-
-
Save unicoder88/c244486f99c9d9822e89125d74a3338a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment