Skip to content
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

Fluidmail: information about replaced recipients not rendert #10

Open
akiessling opened this issue Sep 16, 2022 · 0 comments
Open

Fluidmail: information about replaced recipients not rendert #10

akiessling opened this issue Sep 16, 2022 · 0 comments

Comments

@akiessling
Copy link

Relates to #9
While the mail redirection seems to work properly, the information about the replaced recipients is not added to the mailtext.

It looks like the body is rendered multiple times and thus overwrites the added information
I added some debug information to the generateTemplateBody method in FluidMail (in T3 11.5)

    protected function generateTemplatedBody(string $forceFormat = ''): void
    {
        echo "<pre>";
        \debug_print_backtrace(0, 8);
        echo "</pre>";

This results in 3 renderings in my local ddev setup with smtp mailer / mailhog, but only the first one is from the xclassed mailer

#0 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/FluidEmail.php(137): TYPO3\CMS\Core\Mail\FluidEmail->generateTemplatedBody()
#1 /var/www/html/src/vendor/symfony/mailer/SentMessage.php(33): TYPO3\CMS\Core\Mail\FluidEmail->ensureValidity()
#2 /var/www/html/src/vendor/symfony/mailer/Transport/AbstractTransport.php(70): Symfony\Component\Mailer\SentMessage->__construct(Object(TYPO3\CMS\Core\Mail\FluidEmail), Object(Symfony\Component\Mailer\DelayedEnvelope))
#3 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(136): Symfony\Component\Mailer\Transport\AbstractTransport->send(Object(TYPO3\CMS\Core\Mail\FluidEmail), Object(Symfony\Component\Mailer\DelayedEnvelope))
#4 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/Mailer.php(125): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send(Object(TYPO3\CMS\Core\Mail\FluidEmail), NULL)
#5 /var/www/html/src/public/typo3conf/ext/ameos_mailredirect/Classes/Xclass/Mail/Mailer.php(68): TYPO3\CMS\Core\Mail\Mailer->send(Object(TYPO3\CMS\Core\Mail\FluidEmail), NULL)
#6 /var/www/html/src/public/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php(194): Ameos\AmeosMailredirect\Xclass\Mail\Mailer->send(Object(TYPO3\CMS\Core\Mail\FluidEmail))
#7 /var/www/html/src/public/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php(156): TYPO3\CMS\Form\Domain\Finishers\EmailFinisher->executeInternal()
#0 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/FluidEmail.php(143): TYPO3\CMS\Core\Mail\FluidEmail->generateTemplatedBody()
#1 /var/www/html/src/vendor/symfony/mime/Message.php(117): TYPO3\CMS\Core\Mail\FluidEmail->getBody()
#2 /var/www/html/src/vendor/symfony/mime/RawMessage.php(52): Symfony\Component\Mime\Message->toIterable()
#3 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php(112): Symfony\Component\Mime\RawMessage->toIterable()
#4 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(207): Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream::replace('\r\n.', '\r\n..', Object(Generator))
#5 /var/www/html/src/vendor/symfony/mailer/Transport/AbstractTransport.php(71): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend(Object(Symfony\Component\Mailer\SentMessage))
#6 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(136): Symfony\Component\Mailer\Transport\AbstractTransport->send(Object(Symfony\Component\Mailer\SentMessage), Object(Symfony\Component\Mailer\DelayedEnvelope))
#7 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/Mailer.php(125): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send(Object(TYPO3\CMS\Core\Mail\FluidEmail), NULL)
#0 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/FluidEmail.php(137): TYPO3\CMS\Core\Mail\FluidEmail->generateTemplatedBody()
#1 /var/www/html/src/vendor/symfony/mime/Email.php(464): TYPO3\CMS\Core\Mail\FluidEmail->ensureValidity()
#2 /var/www/html/src/vendor/symfony/mime/Email.php(426): Symfony\Component\Mime\Email->generateBody()
#3 /var/www/html/src/public/typo3/sysext/core/Classes/Mail/FluidEmail.php(145): Symfony\Component\Mime\Email->getBody()
#4 /var/www/html/src/vendor/symfony/mime/Message.php(117): TYPO3\CMS\Core\Mail\FluidEmail->getBody()
#5 /var/www/html/src/vendor/symfony/mime/RawMessage.php(52): Symfony\Component\Mime\Message->toIterable()
#6 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php(112): Symfony\Component\Mime\RawMessage->toIterable()
#7 /var/www/html/src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(207): Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream::replace('\r\n.', '\r\n..', Object(Generator))

Seems like Xclassing MailMessage and FluidMail is still required?

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

No branches or pull requests

1 participant