Skip to content

SMTP not working #205

Closed
Closed

Description

@kbkozlev

Hi all I tried setting up an SMTP service using Mailjet.

I have tested the configuration though and online SMTP testing site, so I have confirmed that the service is working.

This part of my docker compose file

services:
  docmost:
    image: docmost/docmost:latest
    depends_on:
      - db
      - redis
    environment:
      APP_URL: 'http://wiki.MyService.com'
      APP_SECRET: 'Secret'
      DATABASE_URL: 'postgresql://docmost:PASS@db:5432/docmost?schema=public'
      REDIS_URL: 'redis://redis:6379'
      SMTP_HOST: "in-v3.mailjet.com"
      SMTP_PORT: 587
      SMTP_USERNAME: "API KEY"
      SMTP_PASSWORD: "API SECRET KEY"
      SMTP_FROM_EMAIL: "[email protected]"

I have recreated the docker container with docker compose up -d and I tried to invite a new user to the workspace to see if an e-mail will be sent. This has not happened, no matter what I tried.

Activity

  1. YutaNakamizo commented on Aug 26, 2024

    @YutaNakamizo

    The docker compose file looks fine....

    You can check failed reason in redis and I think it will help resolving this issue.

    1. You can see the list of failed email queue on bull:{email-queue}:failed, then check bull:{email-queue}:X (X is queue number which is in the failed list).
    2. You can find failedReason key which has error message (stacktrace key has more detailed information).
  2. kbkozlev commented on Aug 26, 2024

    @kbkozlev
    Author

    I went over the documentation and it seems that adding those lines in the compose file fixed the issue.
    I'm guessing the "MAIL_DRIVER" is the one that is required

    MAIL_DRIVER: 'smtp'
    ...
    MAIL_FROM_NAME: "Docmost"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions