PHP code example of emailsherlock / email-guard-bundle
1. Go to this page and download the library: Download emailsherlock/email-guard-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
emailsherlock / email-guard-bundle example snippets
use Emailsherlock\EmailGuard\EmailGuard;
public function __construct(private EmailGuard $guard) {}
$result = $this->guard->check($email);
if ($result->needsReview()) { ... }
use Emailsherlock\EmailGuardBundle\Event\GuardDecisionEvent;
#[AsEventListener]
final class MyGuardListener
{
public function __invoke(GuardDecisionEvent $event): void
{
if ($event->result->isDenied()) {
// $event->domain -> the domain part (not personal data)
// $event->input -> the raw address (PII: your responsibility)
// $event->result -> verdict, action, reasons, degraded, ...
}
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.