Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

[BUG] <Mail-Support for Office365 not workiing> #77

@C600K3D

Description

@C600K3D

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have a prod instance of snipe-it with the following mail config to enable mail support.

    MAIL_PORT_587_TCP_ADDR=smtp.office365.com
    MAIL_PORT_587_TCP_PORT=587
    [email protected]
    MAIL_ENV_FROM_NAME=snipe-it
    MAIL_ENV_ENCRYPTION=tls 
    [email protected]
    MAIL_ENV_PASSWORD=MyPassword
    MAIL_ENV_DRIVER=smtp
    MAIL_ENV_AUTO_EMBED_METHOD=attachment

For some reason snipe-it cannot establish a connection to the smtp server by itself. I can however establish a connection manually with telnet and curl. I have verified that the env variables are set correctly and that the firewall is not blocking the corresponding traffic. In addition I set up a dev system using the exact same docker-compose.yml file with the result that it can send emails, although it can't send CC.
Neither docker logs nor the laravell log are of any use. The laravell log only shows that snipe-it tries to connect to the smtp server everyday at midnight unsuccessfully because the ssl handshake times out, but does not log the mail sending action and the consequent error.

Expected Behavior

Snipe-it should establish the connection to the server. If that was not possible for unforeseen reasons, snipe-it should should log why the e-mail could not be sent.

Steps To Reproduce

Environment

- OS: Debian 12
- How docker service was installed: Docker was installed with the official docker install script. The service is being run via docker compose

CPU architecture

x86-64

Docker creation

docker compose up -d

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: v7.0.13-ls304
Build-date: 2024-11-11T20:35:20+00:00
───────────────────────────────────────

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions