Postmark\PostmarkAdminClient::verifyDomainSPF PHP Méthode

verifyDomainSPF() public méthode

Request that the Postmark API verify the SPF records associated with the Domain. Configuring SPF is not required to use Postmark, but it is highly recommended, and can improve delivery rates.
public verifyDomainSPF ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID for the Domain for which we wish to verify the SPF records.
Résultat Postmark\Models\DynamicResponseModel
    function verifyDomainSPF($id)
    {
        return new DynamicResponseModel($this->processRestRequest('POST', "/domains/{$id}/verifyspf"));
    }

Usage Example

 function testClientCanVerifySPFForDomain()
 {
     $tk = parent::$testKeys;
     $client = new PostmarkAdminClient($tk->WRITE_ACCOUNT_TOKEN, $tk->TEST_TIMEOUT);
     $domainName = $tk->WRITE_TEST_DOMAIN_NAME;
     $name = 'test-php-spf-' . $domainName;
     $domain = $client->createDomain($name);
     $client->verifyDomainSPF($domain->id);
 }