Switch to use Drupal Symfony Mailer

Created on 27 September 2023, about 1 year ago
Updated 9 January 2024, 11 months ago

Problem/Motivation

Drupal Symfony Mailer replaces Swiftmailer but also Mail System which Postmark uses.

Can Mail System be removed as a dependency, and replaced by Drupal Symfony Mailer ?

See also Send mail with Postmark . An example of using Postmark, configured directly in Drupal Symfony Mailer, without the Postmark module.

Drupal Symfony Mailer > Supported modules status .

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

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

Comments & Activities

  • Issue created by @ressa
  • 🇩🇰Denmark ressa Copenhagen
  • 🇬🇧United Kingdom adamps

    I believe this would mean a transport plug-in for Symfony Mailer Library - i.e. it wouldn't be specific to Drupal, and could be reused anywhere that supports Symfony. It wouldn't have to be a Drupal module.

  • 🇩🇰Denmark ressa Copenhagen

    Thanks for clarifying @AdamPS, and moving Elastic Email and Postmark under a new "Transport plug-ins" on the Drupal Symfony Mailer > Supported modules status page.

    The main reason I created this issue is that emails sent as HTML format maintain HTML tags as expected, but lose line breaks, see 🐛 Impossible to send HTML with plain text email Needs work . For example, the "Reset Password"-email is shown as one long string of text (I added <strong>request</strong> to test HTML, and which worked):

    admin, A request to reset the password for your account has been made at Arst.dk. You may now log in by clicking this link or copying and pasting it into your browser: https://example.org/user/reset/1/1695824463/L-0h[...]x3In00 This link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used. -- Example.org team

    So I tried installing Drupal Symfony Mailer, to use as a formatter, assuming that this would fix the issue, but discovered there wasn't yet any integration with Postmark.

    My hope was that using Drupal Symfony Mailer as Formatter and Postmark as Sender would fix the lost line breaks, but maybe it won't?

  • 🇩🇰Denmark ressa Copenhagen

    @AdamPS: And by the way, since you think a more general transport plug-in for Symfony Mailer Library is needed, I am updating the issue summary and moving this issue there.

    Feel free to adjust the issue summary, and make it more precise :)

  • 🇩🇰Denmark ressa Copenhagen
  • Status changed to Closed: won't fix about 1 year ago
  • 🇬🇧United Kingdom adamps

    The plug-ins would not be in this module. They are 3rd party plug-ins for Symfony Mailer Library. You can check where the other similar plug-ins live - maybe it would be somewhere on github.

  • Status changed to Active about 1 year ago
  • 🇩🇰Denmark ressa Copenhagen

    Ok, then I'll move it back to Postmark, since that's where it's needed for HTML support. (If I understand it correctly)

  • 🇩🇰Denmark ressa Copenhagen
  • 🇩🇰Denmark ressa Copenhagen

    Sorry, I had a steep learning curve here. But I now understand a little bit more what the task is.

Production build 0.71.5 2024