Body of plain text mails is stripped

Created on 18 July 2023, almost 2 years ago

Problem/Motivation

The body of the password reset mail is stripped when using Symfony Mailer Lite as mail sender.

Steps to reproduce

  1. Install Symfony Mailer Lite and set it as formatter in the Mailsystem module
  2. Install and configure Mailchimp Transactional and set it as sender in the Mailsystem module
  3. Send a password reset mail. The body will be empty.

Proposed resolution

There's a mistake in the SymfonyMailer::getContentType method: the second and third return statements can never be reached because of the text/html fallback before the first return statement. This makes it so every mail where the content type is not defined in the content_type or format param is considered an HTML mail. This is a bad assumption since all system mails are plain text mails.

Remaining tasks

Fix the SymfonyMailer::getContentType method.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024