Commit Graph

13 Commits

Author SHA1 Message Date
Rostislav Wolny
4995ed93f0 Refactor invalidation of MSS key to non static method
This is the olny staically called method from the service. In this commit I refactored it to non-static so that it works properly with injected services.
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
Jan Jakes
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
Sam Najian
8d6492ac8c Adjust constructor injections of instantiators of MailPoet
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
Sam Najian
b2e556fd90 Inject WPFunctions to AmazonSES
[MAILPOET-4394]
2022-06-20 09:24:49 +02:00
Jan Lysý
670e6e4cba Replace Swift Mailer for PHPMailer
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
Rostislav Wolny
789385b0c4 Refactor mailerInstance property to mailerMethod
Naming mailerInstance was confusing since
it is not instance of Mailer class but instance of MailerMethod.
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
6240debc10 Declare strict types in newly added MailerRelated classes
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
8970f00bf3 Inject MailerMethod instance through constructor in Mailer
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
36edab34e6 Move logic for return path fallback address from method classes to factory
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
d4a8315933 Use mailerFactory in SendingQueue Mailer task
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
455d22631e Add caching of default mailer instance in MailerFactory
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
51e0426e81 Add MailerFactory service
In this commit I copied and slightly modified functionality used
for creating Mailer instance based on config from the Mailer to an extra class.

The functionality still remains also in Mailer and will be removed later.
I also created test based on the original test for Mailer and added test case
testing it creates specific MailerMethods.
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00