-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
By default `mailhog` service enabled to catch all outbound emails, you can switch to `opensmtpd` (uncomment corresponding service in the compose file) if you need to actually delivery emails. OpenSMTPD can be used together with a third-party SMTP service for guaranteed email delivery by providing [`RELAY_` environment variables](https://github.com/wodby/opensmtpd/#environment-variables) | ||
|
||
By default, we use busybox's sendmail for email delivery together with enabled `mail.mixed_lf_and_crlf` php setting, however this setting has been introduced only in PHP 8.2, for older versions we use `ssmtp` (with `dos2unix` workaround). You can learn more about this setting and why we need a workaround needed in [this issue](https://github.com/php/php-src/issues/8086). The reason we don't use `ssmtp` for all versions is because this approach has issues with corrupting attachments. | ||
We use msmtp for email delivery, PHP 8.2+ has `mail.mixed_lf_and_crlf`, PHP 8.1 and previous versions need to use `dos2unix` workaround. You can learn more about this setting and why we need a workaround needed in [this issue](https://github.com/php/php-src/issues/8086). | ||
|
||
For PHP 8.2+ you need the following environment variables to be set: | ||
``` | ||
PHP_MAIL_MIXED_LF_AND_CRLF: On | ||
PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25' | ||
# if you use opensmtpd | ||
#PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25' | ||
PHP_SENDMAIL_PATH: '/bin/bin/msmtp -t' | ||
MSMTP_HOST: mailhog | ||
MSMTP_PORT: 1025 | ||
``` | ||
|
||
For PHP <8.2: | ||
For PHP 8.1 and previous: | ||
``` | ||
PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"' | ||
SSMTP_MAILHUB: mailhog:1025 | ||
# if you use opensmtpd | ||
#SSMTP_MAILHUB: opensmtpd:25 | ||
PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/bin/msmtp -t"' | ||
MSMTP_HOST: mailhog | ||
MSMTP_PORT: 1025 | ||
``` | ||
|
||
If you want to use OpenSMTPD replace the following env vars: | ||
``` | ||
MSMTP_HOST: opensmtpd | ||
MSMTP_PORT: 25 | ||
``` |