jbkt / docker-php-ssmtp

This Docker image add ssmtp service to official Docker Php7 Apache image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Php7 + Apache + SSMTP

This image add ssmtp service to official Docker Php7 Apache image.

With ssmtp* you can use buildin mail Php function to send mails via smtp server configured by SSMTP_* environment variables.

This image enable also Apache Rewrite mod, RewriteEngine can be used in .htaccess.

docker-compose.yml example to connect apache service to postfix:

version: '3'
services:
  apache:
    image: harobed/php-ssmtp:7-apache
    environment:
      - SSMTP_HOST=postfix
      - SSMTP_PORT=25
      - SSMTP_FROM_HOSTNAME=example.com
      - SSMTP_USE_TLS=Yes
      - SSMTP_USE_STARLTLS=Yes
      - SSMTP_AUTH_USER=user
      - SSMTP_AUTH_PASSWORD=password
    ports:
      - 80

  postfix:
    image: harobed/versatile-postfix:latest
    command: exemple.com user:password
    environment:
      - DISABLE_DKIM=1

networks:
  default:
    driver: bridge

See Dockerfile to see environment variable default values.

How to test

$ git clone https://github.com/harobed/docker-php-ssmtp.git
$ cd docker-php-ssmtp
$ docker-compose up -d
$ echo "Browse to http://`docker-compose port apache 80`"

About

This Docker image add ssmtp service to official Docker Php7 Apache image.


Languages

Language:Dockerfile 34.0%Language:PHP 33.2%Language:HTML 22.2%Language:Makefile 5.8%Language:Shell 4.8%