Error Sending E-Mails for Shared Folders

Hello Nextcloud Community,

i recentrly moved my dockerized Nextcloud to another Server.
Everything runs smooth except for the automatic Mail Sending when Sharing a Folder/File.

Error Message:
Error PHP fgets(): SSL: Connection reset by peer at /var/www/html/3rdparty/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php#77

When pressing the Test E-Mail everything works as expected.

Version: 26.0.4

I already pulled the newest versions but that did not help.

If you need anything else, please let me know.

Docker-Compose Config:

version: '3'

services:
  db:
    image: mariadb
    restart: always
    command: --innodb_read_only_compressed=OFF
    volumes:
      - ./db/:/var/lib/mysql
    env_file:
      - db.env

  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:production-apache
    restart: always
    ports:
      - 8080:80
    volumes:
      - ./data/:/var/www/html
    environment:
      - POSTGRES_HOST=db
      - REDIS_HOST=redis
    env_file:
      - db.env
    depends_on:
      - db
      - redis

  cron:
    image: nextcloud:production-apache
    restart: always
    volumes:
      - ./data/:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis