mirror of
https://github.com/netfun2000/docker-php-nginx.git
synced 2026-10-14 22:31:16 +08:00
Describe how to add e-mail support
This commit is contained in:
@@ -63,3 +63,4 @@ To modify this container to your specific needs please see the following example
|
|||||||
* [Adding xdebug support](docs/xdebug-support.md)
|
* [Adding xdebug support](docs/xdebug-support.md)
|
||||||
* [Adding composer](docs/composer-support.md)
|
* [Adding composer](docs/composer-support.md)
|
||||||
* [Getting the real IP of the client behind a load balancer](docs/real-ip-behind-loadbalancer.md)
|
* [Getting the real IP of the client behind a load balancer](docs/real-ip-behind-loadbalancer.md)
|
||||||
|
* [Sending e-mails](docs/sending-emails.md)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Sending e-mails
|
||||||
|
To be able to use the `mail()` function in PHP you need to install a MTA (Mail Transfer Agent) in the container.
|
||||||
|
|
||||||
|
The most simple approach is to install `ssmtp`.
|
||||||
|
|
||||||
|
The `ssmtp.conf` file needs to be created based on the [documentation online](https://wiki.archlinux.org/title/SSMTP).
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM trafex/php-nginx:latest
|
||||||
|
|
||||||
|
# Install ssmtp
|
||||||
|
RUN apk add --no-cache ssmtp
|
||||||
|
|
||||||
|
# Add configuration
|
||||||
|
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user