Bug #92839
closedmailmessage send via spoolfile
0%
Description
I have upgraded from typo3 9.5 to 10.4. I made adaptions to the new api interface of MailMessage. Sending e-mail directly works fine. When I tried sending via a spool file I got the following problems:
1. For each e-mail 5 identical files were created in the spool directory. So each e-mail shall be send 5 times.
2. When I give the command typo3/sysext/core/bin/typo3 swiftmailer:spool:send I got the error:
typo3 Uncaught TYPO3 Exception Argument 1 passed to
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport::send()
must be an instance of Symfony\Component\Mime\RawMessage,
instance of Symfony\Component\Mailer\SentMessage given,
called in typo3/sysext/core/Classes/Mail/FileSpool.php on line 165
thrown in file vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php in line 129
I have analyzed the causes of these errors. They are because of the following programming errors in method doSend of class FileSpool:
1. Class SentMessage is serialized: “$ser = serialize($message);”
instead of class RawMessage: “$ser = serialize($message-> getMessage());”
2. Within the retry loop for creating the file with the message the loop continues after a successful write. There should be a break statement.
Updated by Georg Ringer about 4 years ago
- Related to Bug #91764: File mail spool generates multiple messages added
Updated by Simon Gilli about 4 years ago
- Related to Bug #92053: Test Mail Setup: Serializer Exception added
Updated by Georg Ringer about 4 years ago
- Status changed from New to Resolved
Thanks for creating the issue. The mentioned problems should be fixed with the as related set issues. Therefore I am closing the issue. A new release for 10.4 will be available soon which will then include those fixes as well.