Commit Graph

15 Commits

Author SHA1 Message Date
5a85390655 Replace remaining calls to utf8_encode() with mb_convert_encoding()
In the previous commit, I removed all calls to the deprecated
utf8_encode() that seemed safe to remove. In this commit, I'm replacing
the calls to this function that I'm not sure if are same to remove or
not with mb_convert_encoding().

mb_convert_encoding() requires the extension mbstring to be enabled. It
should be enabled on most PHP install but not all. We are already using
mbstring functions in our code base and we provide a polyfill for PHP
installs where the extension is not enabled
(62bb75ed91/mailpoet/prefixer/composer.json (L25)).
So it should be safe to use it.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
2b83c8c69f Fix previously sanitized link
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
6c03702fbd Fix test failure that was occurring for multisite
A previous test must have sent a confirmation email to a subscriber with
 the same ID.

 This didn't seem worth adding to the cleanup extension since it was
 only causing a single failure.

MAILPOET-5145
2023-04-07 20:17:05 -05:00
ef3c64b85d Adjust use Html2Text from MailPoetVendor namespace
[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
f11aca925f Do not attempt to send a confirmation email when sending is paused
When sending is paused due to some MSS configuration error the confirmation
email error may cause that the important error from MSS gets overwritten
event reset in case the mail is accidentally sent.
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
68db0dbefe Don't process soft sending errors via MailerLog in confirmation mailer
Soft errors are usually related to the particular email address. We don't want to
pause sending due soft errors.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
e015302a94 Update the confirmation email error message
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
20fcf23f8f Add processing of sending errors to the confirmation mailer
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
210c240aab Update ConfirmationEmailMailer to support custom confirmation email created with the email editor from template
Setup confirmation email customizer in ConfirmationEmailMailer and trigger confirmation email template creation when visual subscription confirmation emails is enabled from settings

MAILPOET-4649
2022-12-15 18:15:01 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
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
0595852d5a Update subscription confirmation email subject
Allow shortcode processing in subject

MAILPOET-4599
2022-11-01 14:59:28 +01:00
80f22c5b50 Process confirmation email content with newsletter shortcode engine
MAILPOET-4599
2022-11-01 14:59:28 +01:00
68cb5c4f79 Inject MailerFactory instead of mailer
We can't create mailer directly in DI container using the factory because it may fail in case
the plugin is not configured properly and prevent plugin from start.

The Mailer was previously injected because it contains lazy initialization.
The lazy initialization in the singleton Mailer service was dangerous,
because when used with some custom parameters it could cause that all services
that inject the Mailer from DI would use the custom config instead the default.
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00