l10n = $l10n; } public function run(string $fromEmail, ?string $replyToEmail) :PhishingDetectionResult { if ($replyToEmail === null) { return new PhishingDetectionResult(PhishingDetectionResult::REPLYTO_CHECK, false); } if ($fromEmail === $replyToEmail) { return new PhishingDetectionResult(PhishingDetectionResult::REPLYTO_CHECK, false); } return new PhishingDetectionResult(PhishingDetectionResult::REPLYTO_CHECK, true, $this->l10n->t('Reply-To email: %1$s is different from sender email: %2$s', [$replyToEmail, $fromEmail])); } }