Modify the check for sender address

to implement rule for existing campaigns.

[MAILPOET-5832]
This commit is contained in:
Brezo Cordero
2024-01-17 16:03:58 -06:00
committed by Aschepikov
parent 56556493fe
commit ab23a01423
4 changed files with 33 additions and 12 deletions

View File

@ -193,7 +193,7 @@ class Newsletters extends APIEndpoint {
]);
}
if ($status === NewsletterEntity::STATUS_ACTIVE && !$this->authorizedEmailsController->isSenderAddressValidForActivation($newsletter)) {
if ($status === NewsletterEntity::STATUS_ACTIVE && !$this->authorizedEmailsController->isSenderAddressValid($newsletter)) {
return $this->errorResponse([
APIError::FORBIDDEN => __('The sender address is not an authorized sender domain.', 'mailpoet'),
], [], Response::STATUS_FORBIDDEN);