lib/mail/EmailAddress.php
public function setEmailAddress($emailAddress)
    {
        if (!(is_string($emailAddress) &&
            filter_var($emailAddress, FILTER_VALIDATE_EMAIL))
        ) {
            throw new TypeException(
                '$emailAddress must be valid and of type string.'
            );
        }
        $this->email = $emailAddress;
    }
public function setEmailAddress($emailAddress)
    {
        if (!(is_string($emailAddress) &&
            filter_var($emailAddress, FILTER_VALIDATE_EMAIL))
        ) {
            throw new TypeException(
                '$emailAddress must be valid and of type string.'
            );
        }
        $this->email = $emailAddress;
    }
public function setEmailAddress ( $ emailAddress ) { if ( ! ( is_string ( $ emailAddress ) && filter_var ( $ emailAddress , FILTER_VALIDATE_EMAIL ) ) ) { throw new TypeException ( '$emailAddress must be valid and of type string.' ) ; } $ this -> email = $ emailAddress ; }
Add the email address to a EmailAddress object

@param string $emailAddress The email address

@throws TypeException
Add the email address to a EmailAddress object