Skip to content

Strict -mx checking? #59

Open
Open
@pjwelsh

Description

@pjwelsh

I'm struggling to figure out how have Email::Valid require both a valid domain and valid MX record, but not succeeding.
For example, the domain "renptr.com" produces positive results as a valid domain, but does not produce positive results for basic system tool MX check:

$ host renptr.com
renptr.com has address x.x.x.x
$ host -t mx renptr.com
renptr.com has no MX record

However, Email::Valid seems to insist the -mx or -mxcheck checks are "valid" when it should not:

$ perl -mEmail::Valid -E "say Email::Valid->address( -address => '[email protected]', -mxcheck => 1 ) ? 'is valid' : 'not valid'"
is valid

How to make the "A" and "MX" and "AND" operation or is this a bug (or am I not running Email::Valid correctly)?

I did see the changelog note about adding the "A" check back to the MX check option and the open ticket #51 for the null MX record, but even making the mentioned code change did not help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions