Skip to content

Instantly share code, notes, and snippets.

@evindunn
Created April 28, 2020 15:28
Show Gist options
  • Save evindunn/93d2935667ea5c653a7e338199b0a588 to your computer and use it in GitHub Desktop.
Save evindunn/93d2935667ea5c653a7e338199b0a588 to your computer and use it in GitHub Desktop.
Sending emails from PHP container
FROM php:7-fpm
RUN apt-get update && \
apt-get install -y \
msmtp-mta \
&& \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN printf 'host my.smtp.server\n' > /etc/msmtprc
COPY php-extras.ini $PHP_INI_DIR/conf.d/99-extras.ini
sendmail_path = msmtp -C /etc/msmtprc -t --read-envelope-from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment