in reply to Data Validation

Looking at Mail::Builder::Address, it uses Mail::Builder::TypeConstraints, which in turn uses Email::Valid, which does (online) alidation of an email address and its MX records.

Maybe your machine is not connected to a DNS server or something else is bad with that email address.

Maybe try using Email::Valid directly to see if Email::Valid thinks your mail address is valid.

I think the check in Mail::Builder::TypeConstraints is a bit wonky:

lc $_ eq lc (Email::Valid->address( %params, -address => $_, )

I think that Email::Valid strips the name and optional comment parts from the mail so that check might fail even though the email address is valid.

Replies are listed 'Best First'.
Re^2: Data Validation
by CalmPerl (Initiate) on Jun 01, 2017 at 21:23 UTC
    Hi thanks for the reply, is there a way to skip the validation altogether?
      You could try to override "Email::Valid::address" in your code, by adding this line early in your code:
      sub Email::Valid::address{return {@_}->{-address}};

                      Once it hits the fan, the only rational choice is to sweep it up, package it, and sell it as fertilizer.

        Ok Thank You I will try that!