Issue Summary
According to the Ghost configuration documentation (Configuration - Adapt your publication to suit your needs) a user should be able to set a Mail From address by using the following setting
"mail": {
"from": "support@example.com",
}
However, myself and others have found that that this setting is being ignore. Issue was also documented in the following post but is now locked Configured "from" address is ignored when sending mail - #2
Steps to Reproduce
- Install Ghost via docker on a server an set it to be hosted on a subdomain such as blog.domain.tld
- Configure Mail From address per configuration documentation mention above
- Preform an activity that results in a transactional email being generated such as account signup or magic link
- Observe the email address for which the email is sent by reviewing the received email.
Setup information
Version: 5.75.0
Environment: production
Database: mysql8
Mail: SMTP
Docker Compose Setup:
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
volumes:
- ghost_db:/var/lib/mysql
networks:
- backend
ghost:
container_name: ghost
image: ghost
hostname: ghost
restart: always
# ports:
- 8080:2368
depends_on:
- db
volumes:
- ghost_data:/var/lib/ghost/content
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: "${MYSQL_ROOT_PASSWORD}"
database__connection__database: ghost
# email infomration
mail__transport: SMTP
mail__from: "${EMAIL_ADDRESS}"
mail__options__host: "${EMAIL_SMTP_SERVER}"
mail__options__port: "${EMAIL_SMTP_PORT}"
mail__options__auth__user: "${EMAIL_USER}"
mail__options__auth__pass: "${EMAIL_PASSWORD}"
# this url value is just an example, and is likely wrong for your environment!
url: "${GHOST_URL}"
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
networks:
- backend
volumes:
ghost_db:
ghost_data:
networks:
backend:
name: ghost_backend
internal: true
Relevant log / error output
See email generated from system which will show it was from noreply@blog.domain.tld regardless of the Mail From setting.