-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
warning about using swiftmail with file spool and lazy loading #7104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,3 +141,16 @@ You can also set the time limit in seconds: | |
Of course you will not want to run this manually in reality. Instead, the | ||
console command should be triggered by a cron job or scheduled task and run | ||
at a regular interval. | ||
|
||
.. caution:: | ||
|
||
When you use the filesystem for spooling, messages are serialized with | ||
the message class name. If the service is lazy loaded this class name | ||
change on every cache clear. So if you send a mail, then you clear the | ||
cache, the message will not be unserialisable. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
On the next ``swiftmailer:spool:send`` an error will raise because the | ||
class ``Swift_Message_<someRandomCharacters>`` doesn't exist (anymore). | ||
|
||
The solutions are either to use the memory spool or to load the | ||
swiftmailer without ``lazy`` option. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something looks missing here:
"the swiftmailer" ... library? service? And another question: about the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still a valid comment, I'm trying to figure out here which service I should change to adjust the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (as using the container debugger, there seems not to be a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explanation is very clear to me ... but maybe we'd need at the beginning a short phrase explaining the
Swift_Message_<someRandomCharacters>
thing that you mention later. Otherwise, this may be confusing:Which class name? I don't create classes to send messages! You don't create them ... but SwiftMailer does that for you.