Skip to content

WordPress can't send email #11

@gabrielcossette

Description

@gabrielcossette

Hi,

Unfortunately, WordPress couldn't send email using your image.

The problem is that WP apparently determines the domain name using the "server_name" NGINX config value and as it is "_" (for the catchall), it is incorrect and it cannot send an email (e.g. forgot password).

To fix this, I added a requirement for a Docker environment variable "SITE" (with the domain name) and added this in the entrypoint:

In:
if [ "$1" == nginx ]; then

This:
sed -i "s/server_name _/server_name $SITE www\.$SITE/" /etc/nginx/conf.d/default.conf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions