Skip to content

Commit

Permalink
Migrate to msmtp for mail sending
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Mar 8, 2024
1 parent 693e011 commit 7ac7ab0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ services:
image: wodby/wordpress-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
# For PHP 8.2 use busybox sendmail together with "PHP_MAIL_MIXED_LF_AND_CRLF=On".
# PHP 8.2+ supports "PHP_MAIL_MIXED_LF_AND_CRLF=On" and does not need dos2unix workaround.
PHP_MAIL_MIXED_LF_AND_CRLF: On
PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25'
# PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S opensmtpd:25'
# # For PHP <8.2 use ssmtp instead of sendmail.
# SSMTP_MAILHUB: mailhog:1025
# SSMTP_MAILHUB: opensmtpd:25
# PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t"'
# #
PHP_SENDMAIL_PATH: '/usr/bin/msmtp -t'
# # PHP 8.1 and previous version require dos2unix workaround.
# PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/bin/msmtp -t"'
# Mailhog:
MSMTP_HOST: mailhog
MSMTP_PORT: 1025
# # OpenSMTPD:
# MSMTP_HOST: opensmtpd
# MSMTP_PORT: 25
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
Expand Down

0 comments on commit 7ac7ab0

Please sign in to comment.