-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The devcontainer currently has no mechanism for local email testing. PHP's sendmail_path is baked into the base mappia/magento-php Docker image and cannot be overridden without modifying the image or manually mounting a custom php.ini.
This means transactional emails (order confirmations, password resets, etc.) either silently fail or require an external SMTP service during local development.
What I would like to see:
- Add a https://github.com/axllent/mailpit service to each version-specific compose file (compose/2.4.6/, 2.4.7/, 2.4.8/, 2.4.9/)
- Make
sendmail_pathconfigurable via environment variable so it can point to the Mailpit sendmail binary. (@damienwebdev )
@tjzijlstra was kind enough to put together a little sample config:
https://gist.github.com/tjzijlstra/600551811c8627e6e2867fab421613b8
I suspect the only ini contents we will need are:
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; https://php.net/sendmail-path
sendmail_path="/usr/local/bin/mailpit sendmail -t --smtp-addr 127.0.0.1:1025"
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Use mixed LF and CRLF line separators to keep compatibility with some
; RFC 2822 non conformant MTA.
mail.mixed_lf_and_crlf = OffI'm not 100% certain we need mail.add_x_header and mail.mixed_lf_and_crlf. We will need to test these.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels