Skip to content

Commit

Permalink
Describe how to add e-mail support
Browse files Browse the repository at this point in the history
  • Loading branch information
TrafeX committed Aug 27, 2023
1 parent 9cda0d0 commit 58f3e7e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ To modify this container to your specific needs please see the following example

* [Adding xdebug support](docs/xdebug-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)
16 changes: 16 additions & 0 deletions docs/sending-emails.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 58f3e7e

Please sign in to comment.