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:
@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 = Off
I'm not 100% certain we need mail.add_x_header and mail.mixed_lf_and_crlf. We will need to test these.
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:
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:
I'm not 100% certain we need
mail.add_x_headerandmail.mixed_lf_and_crlf. We will need to test these.