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

[FEATURE] Adds Event before sending out testmail #205

Closed
wants to merge 4 commits into from

Conversation

dhoffmann1979
Copy link
Member

@dhoffmann1979 dhoffmann1979 commented Jan 25, 2024

The first event can be used to deactivate the internal sending of test emails and implement your own logic, e.g. sending test newsletters via a separate queue.

Relates to: https://projekte.in2code.de/issues/61246

The second event is executed before the body text for the individual newsletter is processed. The event can be used to change or reset the body text that is used for parsing.

Relates to: https://projekte.in2code.de/issues/61356

This event can be used to deactivate the internal sending of test emails and implement your own logic, e.g. sending test newsletters via a separate queue.

Relates to: https://projekte.in2code.de/issues/61246
This event is executed before the body text for the individual newsletter is processed. The event can be used to change or reset the body text that is used for parsing.

Relates to: https://projekte.in2code.de/issues/61356
Copy link
Contributor

@julianhofmann julianhofmann left a comment

Choose a reason for hiding this comment

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

The actual changes around the two new events look good to me.

The "corrected" not passing values to Fluid should still be discussed.

]);
if ($user !== null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So, without $user the variable logs would be not set/exist in Fluid. Currently, Fluid is tolerating undefined variables. As far as I know, this should be changed soon.
Passing an (empty) array - as before - would be cleaner.

The whole block of assignments is useless with $user===null... Why the distinction/decision that only one variable is not assigned?

declare(strict_types=1);
namespace Vendor\Extension\EventListener;

use In2code\Luxletter\Events\AfterTestMailButtonClickedEvent;
Copy link
Contributor

Choose a reason for hiding this comment

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

Import AfterTestMailButtonClickedEvent is not used in this snippet.

@einpraegsam
Copy link
Collaborator

Thx, I just pushed a new commit based on this PR. Some small changes are implemented in b16c18f

@einpraegsam einpraegsam closed this Feb 2, 2024
@einpraegsam einpraegsam deleted the feature/add-testmail-send-event branch February 2, 2024 19:39
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

Successfully merging this pull request may close these issues.

None yet

3 participants