I am having a very difficult time trying to configure Ghost to send e-mail via Office 365. I keep getting a “Send As” denied exception. Is Ghost not using the mail__from environment variable?
I tested probably 20 different configurations, including TLS and Secure options, but continue getting the same message. I know that SMTP is working as I can use send an e-mail via other services using the same account + credentials. It just seems like Ghost is trying to use something other than my mail__from setting.
Any help would be greatly appreciated.
Issue: “Send as” exception denied from Ghost 4.2.2
Ghost URL: https://blog.gallagher.app
Ghost Version: 4.2.2
How was Ghost installed?: Using Docker on Ubuntu 20.04 and Docker compose
Node version: 14.16.1
Database: MariaDB
Errors in console (stdout):
STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied
Steps to reproduce: Setup Office 365 SMTP?
docker-compose.yml:
version: "3" volumes: ghost-db-data: external: true ghost-data: external: true ghost-content: external: true ghost-required: external: true networks: backend: traefik: external: true services: ghost: image: ghost:latest container_name: ghost-blog volumes: - ghost-required:/var/lib/ghost/content - ghost-data:/var/lib/ghost - ghost-content:/var/lib/ghost-content environment: - url=https://blog.gallagher.app - logging__path=/var/lib/ghost-content/logs - logging__transports=["stdout", "file"] - logging__level=debug - logging__rotation__enabled=true - logging__rotation__count=15 - logging__rotation__period=1d - mail__transport=SMTP - mail__from=blog@gallagher.app #- mail__options__service=O365 - mail__options__host=smtp.office365.com - mail__options__port=587 - mail__options__auth__user=blog@gallagher.app - mail__options__auth__pass=**removed** - database__client=mysql - database__connection__host=ghost-db - database__connection__user=ghostdb - database__connection__password=**removed** - database__connection__database=ghostdb - GHOST_CONTENT=/var/lib/ghost-content/ - VIRTUAL_HOST=blog.gallagher.app - VIRTUAL_PORT=2368 networks: - backend - traefik ports: - "8040:2368/tcp" depends_on: - "ghost-db" restart: unless-stopped labels: - 'traefik.enable=true' - 'traefik.http.routers.ghost.rule=Host(`blog.gallagher.app`)' - 'traefik.http.routers.ghost.entrypoints=https' - "traefik.http.routers.ghost.tls=true" - 'traefik.http.routers.ghost.tls.certresolver=letsencrypt' - 'traefik.http.routers.ghost.tls.domains[0].main=blog.gallagher.app' - 'traefik.http.services.ghost.loadbalancer.server.port=2368' ghost-db: image: mariadb:latest container_name: ghost-db volumes: - ghost-db-data:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=**removed** - MYSQL_DATABASE=ghostdb - MYSQL_USER=ghostdb - MYSQL_PASSWORD=**removed** networks: - backend restart: unless-stopped