Conflicts with drupal/core-recommended 10.1.x-dev requires egulias/email-validator ~4.0.1

Created on 12 May 2023, about 1 year ago
Updated 3 April 2024, 3 months ago

Problem/Motivation

I'm currently on Drupal Core 9.2, and I cannot update to 9.3+ due to some depdendancy conflicts.
This is essentially what was mentioned in https://www.drupal.org/project/swiftmailer/issues/3253429 ๐Ÿ› Swift Mailer dependency conflict with drupal/core-recommended Fixed , except that I'm still stuck even with the Swiftmailer 8.x-2.4.
I've created this new ticket, as I wasn't sure if I should be commenting on a closed ticket ( but I did anyway :) ).

Now, Swiftmailer 2.4 has this in composer.json:
"swiftmailer/swiftmailer": "^6.1.3"

The Swiftmailer library itself, has this in composer.json (see https://github.com/swiftmailer/swiftmailer/blob/v6.1.3/composer.json):
"egulias/email-validator": "~2.0"

So while Swiftmailer now doesn't care whether you use ^2 or ^3 , the Swiftmailer library will still not go beyond ^2. This prevents Drupal Core updates to 9.3+ as from that version onwards, egulias/email-validator needs to be ^3

Steps to reproduce

  1. Install Drupal 9.2.x project with drupal/recommended-project and drupal/swiftmailer:^2.4
  2. Try updating Drupal Core using composer update "drupal/core-*" --with-all-dependencies. This should work without errors, but Drupal Core will not update beyond 9.2.21
  3. Try updating Drupal Core manully to 9.3+. This should not work

Proposed resolution

What I believe should fix it, is this is composer.json of Drupal Swiftmailer:
"swiftmailer/swiftmailer": "^6.3"
In addition, I think the entire egulias/email-validator line can also be removed from composer.json as the Swiftmailer library itself takes care of that.

This change will cause issues for people running Drupal Core 9.2 or lower, so an updated minimum Core requirement would be needed as well.

๐Ÿ’ฌ Support request
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium vodde83

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

Merge Requests

Comments & Activities

  • Issue created by @vodde83
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Just ran into this issue trying to update to 10.1.x-dev. I'm wondering why you're having the trouble with 9.3+ already... but yes I can confirm there seems to be some kind of conflict:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Root composer.json requires drupal/core-recommended 10.1.x-dev@dev -> satisfiable by drupal/core-recommended[10.1.x-dev].
        - drupal/swiftmailer[2.4.0, ..., 2.x-dev] require egulias/email-validator ^2.0||^3 -> satisfiable by egulias/email-validator[2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.x-dev].
        - You can only install one version of a package, so only one of these can be installed: egulias/email-validator[1.2.0, ..., 1.2.x-dev, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.x-dev, 4.0.0, 4.0.1, 4.x-dev].
        - symfony/mime[v6.2.0-BETA1, ..., 6.3.x-dev] conflict with egulias/email-validator ~3.0.0.
        - drupal/core-recommended 10.1.x-dev requires egulias/email-validator ~4.0.1 -> satisfiable by egulias/email-validator[4.0.1].
        - drupal/core-recommended 10.1.x-dev requires symfony/mime ~v6.3.0-RC1 -> satisfiable by symfony/mime[v6.3.0-RC1, 6.3.x-dev].
        - Root composer.json requires drupal/swiftmailer ^2.4 -> satisfiable by drupal/swiftmailer[2.4.0, 2.x-dev].
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Setting priority to major as it seems this may become a larger issue when switching to Drupal 10.1.0?

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Let's try to also add the ||^4 compatibility line to the composer.json.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

    I think it needs a complete fork of swiftmailer/swiftmailer to make it work.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Thanks @webflo!

    FYI: For us, this was the final nudge to make the switch to https://www.drupal.org/project/symfony_mailer โ†’
    It worked quite well!
    If it helps anyone: We didn't migrate any Swiftmailer settings.

    Simply uninstalled the swiftmailer & mailsystem module and installed symfony_mailer (without symfony_mailer_bc), left the default settings as-is and renamed the twig files and library. It simply worked! :)
    Our only minor issue was the missing subject variable: โœจ Pass mail subject to the twig files as variable Fixed

    So I won't invest anymore time into this issue. symfony_mailer is the future and while it was a pain some months ago, it seems to work well now :)

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium bramvandenbulcke

    I also encountered this issue when updating to Drupal 10.1. Drupal drupal/core-recommended was updating to 10.1 beta. I just could't figure out the reason. I normally run composer update globally.

    This was the information I needed to solve the problem (and ending up in this thread):

    drupal/core-recommended 10.1.0 requires egulias/email-validator ~4.0.1

    Uninstalling Swiftmailer and Mailsystem and replacing both with Symfony Mailer was indeed the solution. As said by Anybody: my custom email templates used with Swiftmailer are also working with Symfony Mailer.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia kaszarobert

    So does this really mean that from Drupal 10.1 the swiftmailer module is no more? It would be good if someone from the maintainers could acknowledge that because this decision affects the required maintenance work on a lot of legacy sites when upgrading to the latest Drupal. Meaning composer update and drush updb won't be enough, the e-mail features will be needed to be redone completely.

    Also, according to the Symfony Mailer docs about migrating from Swiftmailer โ†’ it is mentioned that "Keep swiftmailer and mailsystem modules for now." That also won't be possible if these external dependencies will collide in the future.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    @kaszarobert as of the technical reasons of this issue and the notes on the module page here, you can see that as confirmed, technically.
    It's not a maintainers decision, we can't do anything about the base repo, see the issue summary.

    So YES. And you don't need to keep the Swiftmailer module. That should indeed please be updated in the docs. Can you do that?

    Thanks!

  • ๐Ÿ‡ท๐Ÿ‡ดRomania claudiu.cristea Arad ๐Ÿ‡ท๐Ÿ‡ด
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 11 months ago
    19 pass
  • @claudiucristea opened merge request.
  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova nick.murza Moldova

    here is the patch for the last merge.

  • ๐Ÿ‡ฒ๐Ÿ‡ฉMoldova nick.murza Moldova
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 11 months ago
    19 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update 11 months ago
    Composer require failure
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    @claudiu.cristea & @nick.murza does that help? Please read #5. so won't the swiftmailer dependencies win? ;)

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia latha@dc

    nagalatha_gampa โ†’ made their first commit to this issueโ€™s fork.

  • I had the same problem with upgrading to 10.1, and switched to symfony_mailer.
    However, the switch did not go smoothly, and I want to write up what I found , just in case somebody else has the same Problem:

    Yes, after renaming the templates, emails did go out using those templates.

    But at least in my case, there are special parameters that are being passed into the twig template (besides body), and these did not appear in the email. Basically, I had assumed that symfony_mailer was just a drop-in replacement for the normal way Drupal does email, using hook_mail etc, but that is not so.

    Here is what I did:
    1) I had to create a special class: /Plugins/EmailBuilder/MymoduleEmailBuilder.php
    which gets assigned to the mail keys.
    2) In there, fill in the various subroutines: createParams, fromArray, build. This is where I populate the parameters and pass them to the template. So for example, I have a $params array that I want to pass to the template, and here I set all the values; only then is this array available in the twig template, and I can use it like {{ params.some_value }}
    3) After this is in place, hook_mail is basically ignored.

    You can see examples of this in the symfony_builder/src/Plugin/... tree itself.

    I found the documentation for this very sparse, but these two links were helpful, epically the second one did 90% of what I needed, and I basically expanded from there:

    1. https://www.drupal.org/docs/contributed-modules/symfony-mailer-0/develop... โ†’
    2. https://arrea-systems.com/integration-with-symfony-mailer-drupal

    Hope it helps.

  • ๐Ÿ‡ท๐Ÿ‡ธSerbia DavorHorvacki

    If we are speaking about solutions, we've created a separate module which contains exactly the same formatter as swiftmailer (minimally modified).

    And switched sender to SMTP Authentication Support โ†’

    Considering we need to migrate hundreds of websites, I believe this is the best option at the moment. It's likely to work seamlessly, so no testing is needed.

    Some of my websites also heavily rely on the mailsystem (and the core system). For me, the additional features in the Symfony mailer are just not worth it.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain guardiola86

    This patch did not work for me, still says:
    drupal/swiftmailer[dev-2.x, 2.4.0] require egulias/email-validator ^2.0||^3

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States DanChadwick

    Composer patches are applied after composer analyzes the requirements. You'd need to create a local copy or fork containing the patch.

  • Status changed to Needs review 10 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia sorlov
  • ๐Ÿ‡ท๐Ÿ‡ดRomania claudiu.cristea Arad ๐Ÿ‡ท๐Ÿ‡ด

    Sorry for posting that MR, I was only experimenting. Ignore it. What you need is to replace drupal/core-recommended with drupal/core in your project composer.json. Remember that drupal/core-recommended is just a wrapper around drupal/core that locks Drupal dependencies to versions that are tested in Drupal CI. That doesn't mean newer dependency versions will not work but, true, you should carefully test them

  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    19 pass
  • @ashm opened merge request.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    19 pass
  • @ashm opened merge request.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    19 pass
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    @claudiu.cristea so there's no way to fix it in swiftmailer, right?

    Should all MR's be closed?

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    run-tests.sh fatal error
  • @anybody opened merge request.
  • ๐Ÿ‡ท๐Ÿ‡ดRomania claudiu.cristea Arad ๐Ÿ‡ท๐Ÿ‡ด

    @Anybody, you don't need to fix, see #11 ๐Ÿ’ฌ Conflicts with drupal/core-recommended 10.1.x-dev requires egulias/email-validator ~4.0.1 Active . I've closed the MR created by me, for the others I have no permissions

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    You mean #22?

  • ๐Ÿ‡ท๐Ÿ‡ดRomania claudiu.cristea Arad ๐Ÿ‡ท๐Ÿ‡ด

    Yes, sorry, corrected

  • ๐Ÿ‡ญ๐Ÿ‡บHungary mxr576 Hungary

    What you need is to replace drupal/core-recommended with drupal/core in your project composer.json. Remember that drupal/core-recommended is just a wrapper around drupal/core that locks Drupal dependencies to versions that are tested in Drupal CI. That doesn't mean newer dependency versions will not work but, true, you should carefully test them

    Based on past experiences, I rather focused on finding a solution that allows us to stick with drupal/core-recommended and also upgrade to Drupal 10 on projects that are still using Swift Mailer. Back then without drupal/core-recommended (and core-dev) it was way to easy for Composer to produce an unstable dependency composition. I would rather not try how it works nowadays.

    So my solution is...

    We are going to register the latest public stable release of Swift Mailer Drupal module (2.4.0) and the last public stable release of Swift Mailer PHP library (6.3.0) as the RC1 version of the next patch release.This is a three birds with one stone approach because:

    • it unblocks the Drupal 10 upgrade
    • It does not block future update of these packages to newer (stable) releases - if there will be any
    • security scanners still report going to report that dependent projects are running on unsupported Swift Mailer module (and the abandoned library) - in contradiction to packages that would use the replace directive

    Apply the following patch on a projectโ€™s root composer.json. It contains only the minimum necessary package definitions from original composer.json files with a constraint change on egulias/email-validator. Since both components depended only public APIs of egulias/email-validator and they did not change between 3.x and 4.x, the following trick works.

    diff --git a/composer.json b/composer.json
    --- a/composer.json	(revision f72dcc34ceefd0a3145e58f325efd3c0610c71b9)
    +++ b/composer.json	(revision 718dd37971a629170236905b56188bcca22cca20)
    @@ -99,6 +99,57 @@
         },
         "repositories": [
             {
    +            "type": "package",
    +            "canonical": false,
    +            "package": {
    +                "name": "drupal/swiftmailer",
    +                "type": "drupal-module",
    +                "description": "Swift Mailer compatibility layer with drupal/core-recommended >= 10.1.0-rc1 that bumped the minimum required egulias/email-validator version to ~4.0.1.",
    +                "version": "2.4.1-rc1",
    +                "require": {
    +                    "drupal/mailsystem": "^4.1.0",
    +                    "egulias/email-validator": "^2.0|^3.0|^4.0",
    +                    "html2text/html2text": "^4.0.1",
    +                    "php": ">=7.0.0",
    +                    "swiftmailer/swiftmailer": "^6.3.1-rc1",
    +                    "tijsverkoyen/css-to-inline-styles": "^2.2"
    +                },
    +                "dist": {
    +                    "type": "zip",
    +                    "url": "https://ftp.drupal.org/files/projects/swiftmailer-8.x-2.4.zip"
    +                },
    +                "_comment": "Read more at https://www.drupal.org/project/swiftmailer/issues/3359916",
    +                "abandoned": "symfony/mailer"
    +            }
    +        },
    +        {
    +            "type": "package",
    +            "canonical": false,
    +            "package": {
    +                "name": "swiftmailer/swiftmailer",
    +                "type": "library",
    +                "description": "Swift Mailer compatibility layer with drupal/core-recommended >= 10.1.0-rc1 that bumped the minimum required egulias/email-validator version to ~4.0.1.",
    +                "version": "v6.3.1-rc1",
    +                "require": {
    +                    "egulias/email-validator": "^2.0|^3.1|^4.0",
    +                    "php": ">=7.0.0",
    +                    "symfony/polyfill-iconv": "^1.0",
    +                    "symfony/polyfill-intl-idn": "^1.10",
    +                    "symfony/polyfill-mbstring": "^1.0"
    +                },
    +                "autoload": {
    +                    "files": [
    +                        "lib/swift_required.php"
    +                    ]
    +                },
    +                "dist": {
    +                    "type": "zip",
    +                    "url": "https://github.com/swiftmailer/swiftmailer/archive/refs/tags/v6.3.0.zip"
    +                },
    +                "_comment": "Read more at https://www.drupal.org/project/swiftmailer/issues/3359916"
    +            }
    +        },
    +        {
                 "type": "path",
                 "url": "web/modules/custom/*"
             },
    
    

    After the patch is applied run composer req drupal/swiftmailer:^2.4.1@rc -W to install these forward compatible version of Swift Mailer packages.

  • ๐Ÿ‡ธ๐Ÿ‡ชSweden johnzzon Gothenburg ๐Ÿ‡ธ๐Ÿ‡ช

    I ended up doing what @mxr576 suggested. This worked well. Gives me time to migrate to Drupal Symfony Mailer. Thanks for sharing your solution!

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada chinosingson

    #32 worked for me. Thanks @mxr576!

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany jan kellermann

    jan kellermann โ†’ made their first commit to this issueโ€™s fork.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 8 months ago
    Fetch Error
  • @jan-kellermann opened merge request.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    4:23
    1:07
    Running
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 8 months ago
    Composer require failure
  • @jan-kellermann opened merge request.
  • Status changed to RTBC 8 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany jan kellermann

    Adding the ^4 constraint solves the problem.

  • Status changed to Active 8 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland Berdir Switzerland

    No, it doesn't. swiftmailer/swiftmailer has that requirement, that will not be updated and is dead. There is and will be no "fix" for this.

    One workaround is some composer trickery to override the constraints per #32.

    However, consider using https://www.drupal.org/project/symfony_mailer_lite โ†’ instead if the switch to symfony_mailer is understandably too much of a jump. That's very close in functionality and behaviour to swiftmailer module, just with symfony/mailer.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alx_benjamin

    #32 worked like charm.

    Thank you

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    #32 is overkill

    All I did was this:

    I added this to my composer require section:

    "egulias/email-validator": "4.0.3 as 3.0.3"

    Then I ran the composer up command with all the components listed as parameters , or if you're brave, with -W

  • Just to add to "symfony mailer lite" (Berdirs comment above): I am running this on multiple production sites without a flaw. It is a true one-to-one drop in replacement for swiftmailer, no code changes required (uses hook_mail just as before); you just set it in "mailsystem" configs and your done.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    @hoporr, is it that easy?
    what about configuration settings that refer to swiftmailer?

    mailsystem.settings.yml

    defaults:
      sender: phpmailer_smtp
      formatter: swiftmailer

    you didn't even have to change this?

  • @joseph.olstad: You go into the mailsystem interface and where it used to say swiftmailer, you set it to symfony_mailer_lite. Done. (Alternatively, you edit that config there).

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine nginex

    #43 works perfect for me, I used the following

    "egulias/email-validator": "4.0.2 as 3.2.6"

    Here is a result

    - Upgrading drupal/core-recommended (9.4.15 => 10.1.6)

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.11 + Environment: PHP 8.2 & pgsql-13.5
    last update 6 months ago
    run-tests.sh fatal error
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.11 + Environment: PHP 8.2 & pgsql-13.5
    last update 6 months ago
    19 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.11 + Environment: php8.3_mysql8
    last update 6 months ago
    Composer require failure
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Striknin Lyon

    #47 ๐Ÿ’ฌ Conflicts with drupal/core-recommended 10.1.x-dev requires egulias/email-validator ~4.0.1 Active Works perfectly !
    Simply add this require in composer.json :

    "egulias/email-validator": "4.0.2 as 3.2.6"

    and run :

    composer update egulias/email-validator -W
    composer require 'drupal/swiftmailer:^2.4' --update-with-dependencies 

    #43 ๐Ÿ’ฌ Conflicts with drupal/core-recommended 10.1.x-dev requires egulias/email-validator ~4.0.1 Active not working on D10.1.7 (conflicts with symfony/mime v6.3.5)

  • First commit to issue fork.
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    I updated #43 due to the recent conflict

  • Merge request !20Update file composer.json โ†’ (Open) created by greenSkin
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 6 months ago
    Composer require failure
  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update 6 months ago
    Composer require failure
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    MR 20 looks good, thanks @greenskin,
    this needs to be committed into the code base.

  • Status changed to RTBC 6 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    ignore the failure, it's a chicken and egg thing.

  • Status changed to Active 6 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland Berdir Switzerland

    As explained in #41, no, no change in this module can fix this and this doesn't need to be committed. The swiftmailer require change does nothing, composer will default to the most recent version and swiftmailer/swiftmailer itself (also) conflicts on the version.

    Several workarounds have been posted, including aliases, not using drupal/core-recommended, custom repositories, but it doesn't change the fact that swiftmailer/swiftmailer is an abandoned project and replaced with symfony/mailer. The only sensible long-term solution for your projects is to switch to a project like symfony_mailer_lite or symfony_mailer. symfony/mailer is now even a drupal/core dependency since 10.2, but the included experimental mailer plugin doesn't yet support any of the extra features of either of those two drupal modules like support for HTML mails nor a UI to configure it, that will come later.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada earthangelconsulting

    we are still in the final testing stages, but it seems that #41 (using symfony_mailer_lite โ†’ ) worked really well for us. all existing mail templates, etc. set up for swiftmailer are working fine. the emails marked as HTML (eg: in webforms) are still being delivered as HTML with no obvious changes.

    that being said, we actually have Mailchimp Transactional mailer set as the formatter and the sender, in the mailsystem page /admin/config/system/mailsystem ... however i am still quite sure that symfony_mailer_lite is doing the trick because:

    - in our DDEV development sites, which are not using mailchimp, emails are still being sent correctly

    - if i understand this, then regardless of what you have set as your mailsystem, swiftmailer is what was providing hook_mail() and hook_mail_alter(), correct? and symfony_mailer does not provide those, though symfony_mailer_lite does? if that is correct, then it is definitely working, as some things that are being set in hook_mail() calls by various contrib modules are still working properly.

    i definitely suggest trying this approach. just install symfony_mailer_lite and it will take over (once the mailsystem page is pointing to it, see below) and then uninstall swiftmailer once you are sure it's working. if you are already in an upgrade situation where swiftmailer is already gone, that's fine, just make sure you check your backup sites, etc. and get any config needed for setting up symfony_mailer_lite (eg: SMTP ports... see below) unless you are just using "php native sendmail" (which has no config details, not within Drupal anyhow).

    aside from installing it, you will need to:

    - set symfony_mailer_lite as your Formatter and Sender, on the mailsystem page /admin/config/system/mailsystem (kind of obvious but i am writing this to help intermediate level devs, as well as experts ;-)

    - configure symfony_mailer_lite at /admin/config/system/symfony-mailer-lite/transport and /admin/config/symfony-mailer-lite/message-settings and test it at /admin/config/system/symfony-mailer-lite/test if using "native php sendmail" to send, it should already be configured on install. if you are using Sendmail or SMTP or other methods, you will need to plug in the hostnames, port numbers, etc. (unless you find that symfony_mailer_lite has copied them correctly from your swiftmailer setup, which it might!) any other issues... refer to https://www.drupal.org/project/symfony_mailer_lite โ†’

    i apologize for any uncertainty about some of the details in the above, this was done very quickly and when most of the way through a very complicated upgrade... though i can safely say that in this case, symfony_mailer_lite saved our butts. thanks maintainers for that sweet module!

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    symfony_mailer_lite worked out for us, although I did have to push up a patch to it for some reason , the developer quickly responded and improved it and we no longer need the patch.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada earthangelconsulting

    @joseph.olstad what was the patch, and what version were you using before patching? i need to see if this applies to my situation.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    It's resolved since, just grab the latest release of symfony_mailer_lite , but since you asked, here it is:
    ๐Ÿ› Lite: Allow sending back-compatibility email with empty To Fixed

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada earthangelconsulting

    thank you @joseph.olstad :-)

  • ๐Ÿ‡น๐Ÿ‡ทTurkey emircanerkul Turkey

    I just need that temporarily to be removed from our system flawlessly. But requiring that forces egulias/email-validator package to use 3.0.x instead of 4.0.x by

    composer why egulias/email-validator
    swiftmailer/swiftmailer  v6.3.0       requires   egulias/email-validator (^2.0|^3.1)
    

    I'm using https://git.drupalcode.org/issue/swiftmailer-3359916/-/commits/3359916-d...

    I think there is no easy way to enforce egulias/email-validator 4.0

Production build 0.69.0 2024