-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DMA for sending email #217
Conversation
It should work that way, but I'll test everything tomorrow again and will then add a test plan. |
Alright, I've added a test case & solved some small but evil build errors. Let me know if you need anything else. 🙃 |
Awesome that there's a PR for that now, I though I've overlooked some build requirement or something. This just leaves the Should I add my workaround ( |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please update it if any action still required. |
This issue has been automatically closed because it has not had recent activity. Please, reopen if you need. |
Alright, I have rebased & updated the branch now, this can definitely be re-opened, but isn't yet ready for merge again. The build seems to work now, but I'll have to check the configuration again, and would like to make sure that log messages are at least shown somewhere:
|
Ah, I can't change the target branch, right, so I have to create a new one? |
Yes create a new one please. There is also some mistakes, 1/ Please change the blueprint files here : 2/ Please also implement somes tests cases in |
Summary
Implement solution for email sending, as discussed in #204.
This PR implements the following features
Explain the motivation for making this change. What existing problem does the pull request solve?
Most PHP hosters make the "mail()" function usable, so many PHP application expect it to be usable. With this image, those applications were unable to send email.
Test plan (required)
docker build -t thecodingmachine/php:7.4-v3-slim-apache -f Dockerfile.slim.apache --build-arg "PHP_VERSION=7.4" --build-arg "GLOBAL_VERSION=v3" .
This failed with
No composer.json present in the current directory, this may be the cause of the following exception.
, but this doesn't seem to be related to this PR. Commenting out Prestissimo (L139-144 in Dockerfile.slim.apache) works as a workaround.docker build -t thecodingmachine/php:apache -f Dockerfile.apache --build-arg "PHP_VERSION=7.4" --build-arg "GLOBAL_VERSION=v3" .
This failed with
chmod: cannot access '/var/lib/snmp/mib_indexes': No such file or directory
, but this doesn't seem to be related to this PR. Adding|| true
to the last line inextensions/core/snmp/install.sh
works as a workaround.echo "<?php mail('[email protected]', 'Hello World', 'This is a test');" > /tmp/test.php
docker run --rm -it --name dma-test -p 8080:80 -v "/tmp/test.php:/var/www/test.php" thecodingmachine/php:apache
curl localhost:8080/test.php
docker run --rm -d --name dma-test -e "[email protected]" -e "DMA_CONF_SMARTHOST=smtp.postmarkapp.com" -e "DMA_AUTH_USERNAME=test" -e "DMA_AUTH_PASSWORD=test" thecodingmachine/php:apache && sleep 2 && docker exec dma-test sudo cat /etc/dma/dma.conf /etc/dma/auth.conf; docker stop dma-test
Closing issues
Fixes #204
Checklist