open_social icon indicating copy to clipboard operation
open_social copied to clipboard

Issue #3232848: Replace swift mailer with symfony mailer.

Open ksis opened this issue 3 years ago • 5 comments

Problem

The swiftmailer library is no longer maintained.

Solution

Replace swift mailer with symfony mailer.

Issue tracker

https://www.drupal.org/project/social/issues/3232848

How to test

  • [ ] Install the social_mailer module
  • [ ] Make sure the swiftmailer, social_swiftmailer and mailsystem modules has been automatically uninstalled
  • [ ] Check that you can configure the module on the /admin/config/opensocial/mail
  • [ ] Trigger any event which will send an email (group invite, post on the user stream, registration)
  • [ ] Make sure you have received the correct email (with correct subject, body, html structure and styles)

Screenshots

NA

Release notes

Behat test related to email were removed because symfony mailer does not support file spool.

Change Record

NA

Translations

NA

ksis avatar Jan 19 '22 13:01 ksis

@ksis Do we need to change anything in https://github.com/goalgorilla/drupal_social/blob/master/docker-compose.yml#L34 or https://github.com/goalgorilla/open_social_scripts/blob/master/install/install_script.sh#L123 ?

navneet0693 avatar Jan 21 '22 13:01 navneet0693

Hi @navneet0693, no changes are needed in the docker-compose.yml, but it makes sense to remove everything related to the swiftmailer from the installation script. Also I will think about how to properly create mailer transport for symfony mailer so that it would work with mailhog.

ksis avatar Jan 21 '22 15:01 ksis

@ksis I see some tests are still failing. For example test with tag @bulk-mails. I think we need to change it since there is no ability to test emails with Symfony Mailer.

Also, could you investigate if it will be possible to rebuild the ability to test emails in Symfony Mailer with the Spool method?

ribel avatar Jan 24 '22 14:01 ribel

Hi @ksis

I was able to reproduce behat test error locally:

behat-test-error

Ressinel avatar Feb 16 '22 16:02 Ressinel

@ksis please resolve the conflicts when you have time.

ribel avatar Mar 16 '22 09:03 ribel