Skip to content

Commit 58f3e7e

Browse files
committed
Describe how to add e-mail support
1 parent 9cda0d0 commit 58f3e7e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ To modify this container to your specific needs please see the following example
6262

6363
* [Adding xdebug support](docs/xdebug-support.md)
6464
* [Adding composer](docs/composer-support.md)
65-
* [Getting the real IP of the client behind a load balancer](docs/real-ip-behind-loadbalancer.md)
65+
* [Getting the real IP of the client behind a load balancer](docs/real-ip-behind-loadbalancer.md)
66+
* [Sending e-mails](docs/sending-emails.md)

docs/sending-emails.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Sending e-mails
2+
To be able to use the `mail()` function in PHP you need to install a MTA (Mail Transfer Agent) in the container.
3+
4+
The most simple approach is to install `ssmtp`.
5+
6+
The `ssmtp.conf` file needs to be created based on the [documentation online](https://wiki.archlinux.org/title/SSMTP).
7+
8+
```Dockerfile
9+
FROM trafex/php-nginx:latest
10+
11+
# Install ssmtp
12+
RUN apk add --no-cache ssmtp
13+
14+
# Add configuration
15+
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf
16+
```

0 commit comments

Comments
 (0)