Commit Graph

115 Commits

Author SHA1 Message Date
Oluwaseun Olorunsola
0bd627d3b1 Add support for checking misconfiguration of the PHP mail function
Some hosts do perform intentional misconfiguration of the mail function, causing it not to work.

When the mail function is misconfigured, we can still access and execute the mail function from within the codebase, but we get an error.

There’s no accurate way to know the PHP mail function is misconfigured. Unless we execute the function with all the proper parameters and check the exception error message against this error `Could not instantiate mail function.`

MAILPOET-4760
2022-12-05 10:25:28 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
John Oleksowicz
37067dff67 Add state to MSS key check response
[MAILPOET-4641]
2022-11-28 14:12:50 +01:00
Sam Najian
db94ec52e6 Acknowledge error code 403 with a different message
When recieving error code 403 from the Bridge, it's treated
as success but with with different message

[MAILPOET-4464]
2022-10-17 12:15:07 +02:00
Jan Lysý
f1b59173dd Add filters into newsletter response
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
7e6f708df8 Create tags when do not exist
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
Oluwaseun Olorunsola
d50aee988e Extract logic to get email domain to Helpers class
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
a006701d78 PR feedback: add type hints, create new methods and save on extra api request
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
5bcb80d2a0 Allow Congratulatory Mss Email with any email from verified domains
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
bd7da6b28c Allow user send with any email address from verified domain
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Jan Lysý
5c57dd2006 Add saving tags for imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
Jan Jakes
c601aaa3eb Autofix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
Rodrigo Primo
9a5fbfbb24 Remove MP2 migration endpoints from the JSON API
[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
Rostislav Wolny
90ff2db0d1 Fix errors caught by translations code sniff
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
e03e375942 Fix variable names and comments typos
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
c58c613959 Use WordPress translation functions directly
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
fd1ac46207 Fix typo in isDomainDmarcRestricted method name
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
847d199352 Implement the Manage Sender Domain component and
The AuthorizeSenderDomainModal

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
5c3a9fe9b2 Add API methods for creating and verifying sender domains
We also included an API method for fetching Sender Domains

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
9e5f1d0ff0 Implement Show sender domain warning for settings
This would show the sender domain warning message for
domains that are not verified and have a Retricted DMARC Policy

MAILPOET-4302
2022-08-11 12:36:23 +02:00
David Remer
76048224d1 Fix WordPress.WP.I18n.NonSingularStringLiteralText errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
Rostislav Wolny
d3e2bcdf34 Refactor daemon trigger and daemon run actions to extra classes
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
eedc18bb7f Trigger action scheduler runner immediately when starting sending
When users click send email in UI, they need to wait a minute or more to
see some emails started going out.

This commit adds additional trigger into sending queue API.
If emails is set to send it triggers Action Scheduler immediately.
Users will get immediate feedback that emails are sending.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Sam Najian
bd3b4f1e93 Remove Newsletter model usages
[MAILPOET-4361]
2022-07-18 16:47:48 +02:00
Oluwaseun Olorunsola
5d8b721a52 Annotate return type and use consistent return data
MAILPOET-4300
2022-07-18 12:53:49 +02:00
Oluwaseun Olorunsola
ee70d2dd1e Implement polling and reconfirmation
This will poll the server every certain interval (15s) for the email address
and stop polling if the email is Authorized or the modal is closed or after a certain period of time (2 hours)

MAILPOET-4300
2022-07-18 12:53:49 +02:00
Oluwaseun Olorunsola
1fda60bfea Implement API endpoints
MAILPOET-4300
2022-07-18 12:53:49 +02:00
Brezo Cordero
3d1365595b Remove catch block and change quotes
Remove catch block to log unexpected exceptions and change quotes for consistency on error message.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
Brezo Cordero
53b9f79e65 Catch the correct Exception when creating a list on import
This is not part of this issue but found it when looking at the Exception types.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
Brezo Cordero
2e5e8e808f Verify that new email is unique when editing a subscriber
Throws an exception with information message if email already exists.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
Jan Lysý
5ab04b8b22 Remove usage constant from the old model
[MAILPOET-4338]
2022-05-19 14:18:06 +02:00
John Oleksowicz
ab609c8867 Remove subscriber check from newsletter validator
Checking the subscriber limit has nothing to do with the newsletter
itself, so it makes more sense to continue to perform that check as
needed elsewhere in the codebase.

MAILPOET-4236
2022-05-16 11:17:29 +02:00
John Oleksowicz
8983d5e3f7 Move subscriber limit check into validator
[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
John Oleksowicz
9bfe2b2ca1 Newsletter validation updates
- Rename validator to newsletterValidator for clarity
- Add validation for ALC content
- Refactor tests to use data factory for consistency and to avoid
validation issues
- Add separate tests for NewsletterValidator service
- Add test helper for retrieving service with private properties
overridden by name

[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
John Oleksowicz
a5103f9596 Move reengagement validations into validator
[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
John Oleksowicz
27a86d2ca6 Check validity on activating newsletters
This prevents users from activating automatic emails from listing pages
that are not valid.

This also adds more checks for the content of a newsletter, requiring
that a newsletter have at least one content block in order to be valid.
This change makes the server side validation check match what we're
checking in the editor in mailpoet/assets/js/src/newsletter_editor
/components/save.js and mailpoet/assets/js/src/newsletters/send.jsx

[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
John Oleksowicz
fdaf22d46b Extract newsletter validation to a service
[MAILPOET-4236]
2022-05-16 11:17:29 +02:00
Sam Najian
3339d2f877 Correctly set dynamic arg false for Posts block requests
[MAILPOET-4278]
2022-05-02 13:49:05 +02:00
Rostislav Wolny
62c7022227 Improve message for confirmation emails when confirmation is disabled
[MAILPOET-4149]
2022-05-02 13:47:54 +02:00
David Remer
ca3f8bdc43 Make Scheduler non-static
[MAILPOET-4252]
2022-04-25 12:08:18 +02:00
Sam
bcae8ade3f Revert "Revert "Restrict dynamic blocks to public post status only""
This reverts commit 79991ae462.
2022-04-18 11:43:47 +02:00
Sam
c32dc0a372 Revert "Revert "Define BlockPostQuery for nicer args processing for quering""
This reverts commit 62e393a76d.
2022-04-18 11:43:47 +02:00
Sam
7631042f3d Revert "Revert "Check post-types validity for requests""
This reverts commit fdb4663ca1.
2022-04-18 11:43:47 +02:00
Rodrigo Primo
fdb4663ca1 Revert "Check post-types validity for requests"
This reverts commit b800cf189f.
2022-04-11 16:30:59 -03:00
Rodrigo Primo
62e393a76d Revert "Define BlockPostQuery for nicer args processing for quering"
This reverts commit 5b40a585e7.
2022-04-11 16:30:59 -03:00
Rodrigo Primo
79991ae462 Revert "Restrict dynamic blocks to public post status only"
This reverts commit 72b3172c1a.
2022-04-11 16:30:59 -03:00
Sam Najian
72b3172c1a Restrict dynamic blocks to public post status only
[MAILPOET-4082]
2022-04-11 14:54:56 -03:00
Sam Najian
5b40a585e7 Define BlockPostQuery for nicer args processing for quering
[MAILPOET-4082]
2022-04-11 14:54:56 -03:00