Kategorien
Blog Software

Mail for the WordPress Docker setup

After setting up the docker containers for WordPress and the NGINX Proxy Manager I still had one open issue: Sending mail was not possible. So I was looking for a solution to set up mail for the WordPress Docker setup.

I had the following options in mind:

  1. Setting up a separate docker container with an e-mail server. More or less I just needed a so-called Smarthost, that takes sent-out e-mails from any docker container and forwards them to my e-mail provider, Gmail. I struggled to find a proper, small image of a mail server running on an RPi for a long time. Then open the ports of the WordPress containers and send the e-mail from the WordPress containers to the container with the Smarthost Mail server. Nevertheless, you must install any kind of mailer within the container to handle the mail() call coming from WordPress.
  2. Set up an email server on the host (I used exim4) and let all Docker containers send their e-mails to the host, which will then be forwarded to the real e-mail provider by exim4. Still, you must install any kind of mailer within the container to handle the mail() call coming from WordPress. There were the following sub steps necessary:
  3. Setting up a WordPress Plugin, connecting via SMTP to the e-mail provider.

The variants 1 & 2 generated so many problems during the setup, that I finally decided to go with variant . This was set up in 30 minutes only!

For this SMTP service, I’m using the plugin WP Mail SMTP.

Von Gerhard Vogt

Born in Munich, but living more then 10 years now in the lovely Stuttgart area.
Grown up in a technical environment, moved then into the project and people management.
I'm interested in plenty of outdoor sports like sailing, biking, skiing, hiking, but also ball sports like tennis and badminton.
Travelling the world, and making photos is another hobby.
Never get bored! :-)

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert