Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adapt to Swiftmailer 5 and Swiftmailer 6 version of class Swift_ConfigurableSpool #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thirsch
Copy link
Collaborator

@thirsch thirsch commented Feb 7, 2023

@thePanz as promised, here is a possible solution of the swiftmailer issue. What do you think?

Btw. as the swiftmailer package is discontinued but needs a small adjustment for php 8.2: Should we clone the official repo in fos1 as well or try to adapt to symfony/mailer?

@connorhu
Copy link
Collaborator

connorhu commented Feb 9, 2023

+1 for symfony/mailer wrapper as a mailer plugin.

@thePanz
Copy link
Member

thePanz commented Feb 10, 2023

For reference: #240 (comment)

@thirsch thirsch force-pushed the feature/swiftmailer-6-compat branch from 2e2bd83 to d6fc1b0 Compare February 11, 2023 08:52
@thirsch
Copy link
Collaborator Author

thirsch commented Feb 11, 2023

Do you have any experience, how to use the spool? I've thought about creating a test for it. While browsing the test sources, I've come across https://github.com/FriendsOfSymfony1/symfony1/blob/master/test/unit/mailer/fixtures/TestSpool.class.php which is referencing Swift_Mime_Message as well.

@connorhu
Copy link
Collaborator

connorhu commented Feb 13, 2023

I am currently using Swfitmailer with spool under Symfony5. I can figure out how to set it up here.

@thePanz
Copy link
Member

thePanz commented Feb 13, 2023

we might need to run the tests on the CI with --prefer-lowest to test both versions of the SwiftMailer, wdyt?

@connorhu
Copy link
Collaborator

@thirsch File(system) spool example configuration:

factories.yml

  mailer:
    param:
      delivery_strategy: spool
      spool_class: Swift_FileSpool
      spool_arguments:
        - "spoolpath"

image

@connorhu
Copy link
Collaborator

@@ -71,9 +71,9 @@ public function stop()
/**
* Stores a message in the queue.
*
* @param Swift_Mime_Message $message The message to store
* @param $message The message to store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param $message The message to store
* @param object $message The message to store

wdyt @thirsch ?

@thePanz
Copy link
Member

thePanz commented Mar 4, 2025

Btw I found this about spools: https://symfony.com/legacy/doc/more-with-symfony/1_4/en/04-Emails#chapter_04_sub_the_spool_strategy

Does it mean that the Swift_FileSpool should be adapted too?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants