Code Monkey home page Code Monkey logo

ameos_mailredirect's People

Contributors

ameos avatar lucmuller avatar mschwehr avatar stephane-fillion avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ameos_mailredirect's Issues

Not working with form framework and fluid mails

Hi, currently your extension is not working with form framework email finishers when fluid mails are enabled.

In this case:
https://github.com/TYPO3/typo3/blob/v11.5.10/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php#L194
the send method of the mailer class is called directly, so your provided xclasses will not fire at all.

I am using TYPO3 11.

Is it possible to xclass the Mailer-Class itself? Then maybe your other xclasses are not required anymore. A better approach could also be a PSR-14 event: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Events/Events/Core/Mail/AfterMailerInitializationEvent.html, but this will work only for TYPO3 11+ then.

What do you think?

inconsistent php version constraint

Hi, can you please update the PHP version constraint inside ext_emconf.php? :)

The current value inside ext_emconf.php does not match the constraint inside composer.json.

ext_emconf.php
'php' => '5.5.0-7.3.99'

composer.json
"php": ">=7.0.0"

Thank you in advance :)

Fluidmail: information about replaced recipients not rendert

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.