From 5860a558c18ce28af35e351be55427c384a8e7fc Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Mon, 11 Oct 2021 15:40:58 +0100 Subject: [PATCH 1/4] ISAICP-6726: Update Swiftmailer to 2.x. --- composer.json | 6 +- composer.lock | 260 +++++++++++++++++++++++++++++++------------------- 2 files changed, 167 insertions(+), 99 deletions(-) diff --git a/composer.json b/composer.json index 517e41b098..012555c5b2 100644 --- a/composer.json +++ b/composer.json @@ -77,7 +77,7 @@ "drupal/spdx": "^1.0", "drupal/state_machine": "^1.0", "drupal/subpathauto": "dev-1.x#fcd7c1c4c49d5ee1648630d92eb9da46e6bf25f0", - "drupal/swiftmailer": "dev-1.x#694cbf25d8c026b0c7c118093696d151a7874754", + "drupal/swiftmailer": "dev-2.x", "drupal/token": "~1.7", "drupal/video_embed_field": "~1.6", "drupal/view_unpublished": "^1.0", @@ -334,8 +334,8 @@ "Subpaths with redirect not resolved @see https://www.drupal.org/project/subpathauto/issues/3175637": "https://git.drupalcode.org/project/subpathauto/-/merge_requests/1/diffs.diff" }, "drupal/swiftmailer": { - "Add spooling for increased performance @see https://www.drupal.org/project/swiftmailer/issues/3000553": "https://www.drupal.org/files/issues/2019-08-26/3000553-18.patch", - "Allow Cc and Bcc headers @see https://www.drupal.org/project/swiftmailer/issues/2892104": "https://www.drupal.org/files/issues/2019-08-26/2892104-21.patch" + "Add spooling for increased performance @see https://www.drupal.org/project/swiftmailer/issues/3000553": "https://git.drupalcode.org/project/swiftmailer/-/merge_requests/2.diff", + "Allow Cc and Bcc headers @see https://www.drupal.org/project/swiftmailer/issues/2892104": "https://www.drupal.org/files/issues/2021-10-11/2892104-38.patch" }, "drupal/video_embed_field": { "Extend support for embed URLs. Option to force privacy @see https://www.drupal.org/project/video_embed_field/issues/3060201 (originally on https://www.drupal.org/node/2899093)": "https://www.drupal.org/files/issues/2019-06-11/privacy_mode-3060201-D8-6.patch" diff --git a/composer.lock b/composer.lock index 754336e360..474a58d0e5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c61c9b160bcd506b3f00e5e56179c5c", + "content-hash": "5b4332ea4604ed98ccfa328d30b82ee7", "packages": [ { "name": "SEMICeu/adms-ap_validator", @@ -3831,8 +3831,7 @@ }, "patches_applied": { "Facet Summary for Facet Items with a set dependency. @see https://www.drupal.org/node/2873480": "resources/patch/facet_summary_for_facet-2873480-18.patch", - "SA-CONTRIB-2021-008. @see https://www.drupal.org/sa-contrib-2021-008": "https://www.drupal.org/files/issues/2021-05-17/3213582-facets-1.6-1.7.patch", - "https://www.drupal.org/project/facets/issues/3223956": "https://git.drupalcode.org/project/facets/-/merge_requests/25.diff" + "SA-CONTRIB-2021-008. @see https://www.drupal.org/sa-contrib-2021-008": "https://www.drupal.org/files/issues/2021-05-17/3213582-facets-1.6-1.7.patch" } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -7019,39 +7018,42 @@ }, { "name": "drupal/swiftmailer", - "version": "dev-1.x", + "version": "dev-2.x", "source": { "type": "git", "url": "https://git.drupalcode.org/project/swiftmailer.git", - "reference": "694cbf25d8c026b0c7c118093696d151a7874754" + "reference": "0fcfeef94b2b5dd37e31305d2c22c5d73232dfaf" }, "require": { - "drupal/core": "~8.0", - "drupal/mailsystem": "*", - "html2text/html2text": "~4.0.1", - "swiftmailer/swiftmailer": "~5.4.5" + "drupal/core": "^8.9.11 || ^9.0.10", + "drupal/mailsystem": "^4.1.0", + "egulias/email-validator": "^2.0", + "html2text/html2text": "^4.0.1", + "php": ">=7.0.0", + "swiftmailer/swiftmailer": "^6.1.3", + "tijsverkoyen/css-to-inline-styles": "^2.2" }, "type": "drupal-module", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-2.x": "2.x-dev" }, "drupal": { - "version": "8.x-1.0-beta2+11-dev", - "datestamp": "1554499381", + "version": "8.x-2.0+1-dev", + "datestamp": "1628154387", "security-coverage": { "status": "not-covered", "message": "Dev releases are not covered by Drupal security advisories." } }, "patches_applied": { - "Add spooling for increased performance @see https://www.drupal.org/project/swiftmailer/issues/3000553": "https://www.drupal.org/files/issues/2019-08-26/3000553-18.patch", - "Allow Cc and Bcc headers @see https://www.drupal.org/project/swiftmailer/issues/2892104": "https://www.drupal.org/files/issues/2019-08-26/2892104-21.patch" + "Add spooling for increased performance @see https://www.drupal.org/project/swiftmailer/issues/3000553": "https://git.drupalcode.org/project/swiftmailer/-/merge_requests/2.diff", + "Allow Cc and Bcc headers @see https://www.drupal.org/project/swiftmailer/issues/2892104": "https://www.drupal.org/files/issues/2021-10-11/2892104-38.patch" } }, "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { @@ -7084,7 +7086,7 @@ "support": { "source": "https://git.drupalcode.org/project/swiftmailer" }, - "time": "2019-04-05T21:22:03+00:00" + "time": "2021-09-04T15:57:00+00:00" }, { "name": "drupal/token", @@ -8341,16 +8343,16 @@ }, { "name": "html2text/html2text", - "version": "4.0.1", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/mtibben/html2text.git", - "reference": "f55104b7c9f99b0937f0e20fe051b19f9c0ecad1" + "reference": "61ad68e934066a6f8df29a3d23a6460536d0855c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mtibben/html2text/zipball/f55104b7c9f99b0937f0e20fe051b19f9c0ecad1", - "reference": "f55104b7c9f99b0937f0e20fe051b19f9c0ecad1", + "url": "https://api.github.com/repos/mtibben/html2text/zipball/61ad68e934066a6f8df29a3d23a6460536d0855c", + "reference": "61ad68e934066a6f8df29a3d23a6460536d0855c", "shasum": "" }, "require-dev": { @@ -8371,10 +8373,10 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPLv2" + "GPL-2.0-or-later" ], "description": "Converts HTML to formatted plain text", - "time": "2016-03-16T23:24:34+00:00" + "time": "2020-04-16T23:44:31+00:00" }, { "name": "jacklmoore/autosize", @@ -8385,7 +8387,7 @@ "reference": "master" }, "type": "drupal-theme-library", - "time": "2018-10-31T20:10:45+00:00" + "time": "2021-05-17T17:56:07+00:00" }, { "name": "kub-at/php-simple-html-dom-parser", @@ -10543,7 +10545,7 @@ "reference": "master" }, "type": "library", - "time": "2020-08-03T19:59:39+00:00" + "time": "2021-05-20T17:05:25+00:00" }, { "name": "stack/builder", @@ -10678,29 +10680,36 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.12", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "181b89f18a90f8925ef805f950d47a7190e9b950" + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/181b89f18a90f8925ef805f950d47a7190e9b950", - "reference": "181b89f18a90f8925ef805f950d47a7190e9b950", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", "shasum": "" }, "require": { - "php": ">=5.3.3" + "egulias/email-validator": "^2.0|^3.1", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.2" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "6.2-dev" } }, "autoload": { @@ -10728,7 +10737,17 @@ "mail", "mailer" ], - "time": "2018-07-31T09:26:32+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "time": "2021-03-09T12:30:35+00:00" }, { "name": "symfony-cmf/routing", @@ -10935,6 +10954,69 @@ ], "time": "2020-10-24T10:57:07+00:00" }, + { + "name": "symfony/css-selector", + "version": "v4.4.27", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", + "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:19:41+00:00" + }, { "name": "symfony/debug", "version": "v4.4.31", @@ -12736,6 +12818,55 @@ ], "time": "2020-10-24T10:57:07+00:00" }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.3", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.5 || ^7.0 || ^8.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "time": "2020-07-13T06:12:54+00:00" + }, { "name": "twig/twig", "version": "v1.43.1", @@ -18998,69 +19129,6 @@ ], "time": "2021-08-04T20:31:23+00:00" }, - { - "name": "symfony/css-selector", - "version": "v4.4.27", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", - "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Converts CSS selectors to XPath expressions", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-21T12:19:41+00:00" - }, { "name": "symfony/dom-crawler", "version": "v4.4.30", From 74088c11bdbc55a8d23be31783199a30beabea40 Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Wed, 13 Oct 2021 09:32:03 +0100 Subject: [PATCH 2/4] ISAICP-6726: Fix swiftmailer.message config. --- config/sync/swiftmailer.message.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/sync/swiftmailer.message.yml b/config/sync/swiftmailer.message.yml index 6c7535e67c..297aabe9a6 100644 --- a/config/sync/swiftmailer.message.yml +++ b/config/sync/swiftmailer.message.yml @@ -1,7 +1,6 @@ -format: text/html -respect_format: true -convert_mode: true +content_type: text/html +text_format: plain_text +generate_plain: true character_set: UTF-8 _core: default_config_hash: 1ErUI34W400SFVtJGG8W1mfDZ6-Dw3L9l9ZST2PsTMs -filter_format: plain_text From 04c21387ecaddead484b9d27e5080b597f8b409e Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Wed, 13 Oct 2021 15:20:31 +0100 Subject: [PATCH 3/4] ISAICP-6726: Fix swiftmailer.transport config. --- config/sync/swiftmailer.transport.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/sync/swiftmailer.transport.yml b/config/sync/swiftmailer.transport.yml index 2d89f79ec0..d1f0052201 100644 --- a/config/sync/swiftmailer.transport.yml +++ b/config/sync/swiftmailer.transport.yml @@ -1,15 +1,12 @@ -transport: native +transport: sendmail smtp_host: 127.0.0.1 smtp_port: 25 -smtp_encryption: '' +smtp_encryption: '0' smtp_credential_provider: swiftmailer smtp_credentials: swiftmailer: username: '' password: '' - key: - username: '' - password: '' sendmail_path: /usr/sbin/sendmail sendmail_mode: bs spool_directory: '' From eec7d39eed2d7856279cea3f11815ecc12a565db Mon Sep 17 00:00:00 2001 From: Alexandre Dias Date: Fri, 15 Oct 2021 14:04:23 +0100 Subject: [PATCH 4/4] ISAICP-6726: Add spool as default swiftmailer transport. --- config/sync/swiftmailer.transport.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sync/swiftmailer.transport.yml b/config/sync/swiftmailer.transport.yml index d1f0052201..a4907c5157 100644 --- a/config/sync/swiftmailer.transport.yml +++ b/config/sync/swiftmailer.transport.yml @@ -1,4 +1,4 @@ -transport: sendmail +transport: spool smtp_host: 127.0.0.1 smtp_port: 25 smtp_encryption: '0' @@ -9,4 +9,4 @@ smtp_credentials: password: '' sendmail_path: /usr/sbin/sendmail sendmail_mode: bs -spool_directory: '' +spool_directory: /tmp/spool/