I’m new with docker, docker-compose and wordpress/nginx/smtp… I try to learn how to use them. I also begin with wordpress, nginx, … The last wordpress I use was a package already configured.
I have a VPS with ubuntu. Docker and Docker-compose installed.
I use docker-compose with 4 containers (I try this French example) :
- PHP-FPM with wordpress
I can’t send email and despite many research and try, I can’t fix it.
Please correct me if I’m wrong, when I send an email :
- Wordpress prepares the email (A/CC/BCC, From, object, content, …)
- Wordpress/PHP sends email to Nginx container through SMTP
- Nginx send email out of the docker
- My VPS send the email
I’m not sure at all…
In this configuration, I’m surpris that there is no mail server. So I try to link another docker : postfix, docker_smtp, enimx, …
I add “WP Mail SMTP” plugin to Wordpress, it seems to use SMTP instead of a common email : no progress.
I’ve installed postfix on my vps, without a container. I can send email by comand line but no way to link it to my wordpress web site.
My questions :
- Do I need to open some ports to nginx or to wordpress/php?
- Do I need a container to send email like postfix or PHP/FPM is enough?
- Is it better to send email through an SMTP service like google or another one?