Compatibility with Symfony Mailer

Created on 31 December 2021, almost 3 years ago
Updated 29 August 2024, 3 months ago

Is any D9 compatible version of this module ready to use with Symfony Mailer β†’ , the successor to Swift Mailer/Mail System?

I'm trying to setup my website to send an email newsletter that is built as a node in Drupal populated with content from Views. The Sendgrid Integration module says it requires the Mail System module, but Symfony Mailer replaces the Swift Mailer/Mail System modules.

Perhaps the best way to do this is to simply setup Symfony Mailer to send through Sendgrid via SMTP without using the Sendgrid Module? Suggestions and advice greatly appreciated!

✨ Feature request
Status

Closed: works as designed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States playful

Live updates comments and jobs are added and updated live.

Missing content requested by

πŸ‡¦πŸ‡ΊAustralia dpi
7 months ago
Sign in to follow issues

Comments & Activities

  • Issue created by @playful
  • πŸ‡ΊπŸ‡ΈUnited States Perignon

    I do not know about Symfony Mailer specifically but this module is fully compatible with the latest Drupal 9.x

  • πŸ‡¬πŸ‡§United Kingdom jonathanshaw Stroud, UK

    Symfony mailer is a replacement for swiftmailer, which is EOL. Swiftmailer was the most common way to send HTML emails from
    Drupal. The Drupal symfony_mailer module is therefore experiencing very rapid adoption. For example, it is recommended by Drupal commerce: https://www.centarro.io/blog/replace-swift-mailer-symfony-mailer-html-email

    Therefore I believe this module - if it aims to be the sensible normal option for integrating Sendgrid with Drupal - should support Symfony mailer. This will likely involve a plugin for drupal/symfony_mailer; it may also involve a custom symfony mailer transport, but we may be able to avoid that and depend on the symfony/sendgrid-mailer package.

    Regarding symfony mailer and sendgrid, I found this informative:
    https://symfonycasts.com/screencast/mailer/sendgrid

  • πŸ‡ΊπŸ‡ΈUnited States iknowbryan

    YES! Just spent several days trying to figure out issues sending email from a new D9 site and finally ended up here hoping there was a solution for the sg_integration dependency on swift when symfony seems to be the next gen for drupal HTMK emails. Thanks so much for all the great work on the module to date. We've used it for several clients and has been great. Would love to keep using it in the future.

  • πŸ‡ΊπŸ‡ΎUruguay rpayanm

    You don't need sendgrid_integration module to use Sendgrid with Symfony Mailer module.

    Do this:
    1. Uninstall sendgrid_integration and mailsystem modules.
    2. Add symfony/sendgrid-mailer package with composer.
    3. Install symfony_mailer module.
    4. On the Transport tab, add a DSN one, and with this config: sendgrid://KEY@default. KEY is your Sendgrid key. Save.

  • Haris Khan Jadoon β†’ made their first commit to this issue’s fork.

  • πŸ‡¨πŸ‡¦Canada kylebehse

    Thanks, @rpayanm!
    OMG, so easy but little documentation at this point. I'm going to add some keywords to the thread to make it easier for other people to find...
    Drupal 10 Symfony Mailer not working with Sendgrid API.
    Common errors:

    • drupal symfony mailer Unable to write bytes on the wire
    • drupal Error sending email: Unsupported sendmail command flags "/bin/true"; must be one of "-bs" or "-t" but can include additional flags.
  • πŸ‡ΊπŸ‡ΈUnited States rondog469

    one more thing to add to @rpayanm's list was to be sure to set the new DSN transport to default. Mine was the "Sendmail" one that was there when I installed the module. I didn't realize I had to set the default.

  • πŸ‡ΊπŸ‡ΈUnited States MattDanger

    I can confirm that @rpayanm's suggestion in #5 is a working solution. Thanks for the tip Rolando!

  • Status changed to Closed: works as designed 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Chris Matthews
Production build 0.71.5 2024