PHP Class Bogardo\Mailgun\Validation\Validator

Show file Open project: bogardo/mailgun

Protected Properties

Property Type Description
$mailgun Mailgun\Mailgun

Public Methods

Method Description
__construct ( Mailgun $mailgun )
parse ( array | string $addresses, boolean $syntaxOnly = false ) : mixed Parses an array of email addresses into two lists: parsed addresses and unparsable portions.
validate ( string $address ) : stdClass Validate an address based on: - Syntax checks (RFC defined grammar) - DNS validation - Spell checks - Email Service Provider (ESP) specific local-part grammar (if available).

Method Details

__construct() public method

public __construct ( Mailgun $mailgun )
$mailgun Mailgun\Mailgun

parse() public method

The parsed addresses are a list of addresses that are syntactically valid (and optionally have DNS and ESP specific grammar checks). The unparsable list is a list of characters sequences that the parser was not able to understand. These often align with invalid email addresses, but not always.
public parse ( array | string $addresses, boolean $syntaxOnly = false ) : mixed
$addresses array | string
$syntaxOnly boolean
return mixed

validate() public method

The validation service is intended to validate email addresses submitted through forms like newsletters, online registrations and shopping carts. It is not intended to be used for bulk email list scrubbing and Mailgun reserves the right to disable your account if Mailgun sees it being used as such.
public validate ( string $address ) : stdClass
$address string
return stdClass

Property Details

$mailgun protected property

protected Mailgun,Mailgun $mailgun
return Mailgun\Mailgun