Not meaning to tread on your toes
Don't worry... I wear steel toed sandals here at The
Monastary! ;-)
E::V cannot validate that the actual address is correct, only that there is an MX record for the domain
Agreed, and in my at the time caffeine deprived state I
read between the lines and came to the conclusion that the
trouble the OP was running into was Sendmail barfing on
the email address. The only things I can think of that
would cause that would be
- The address is malformed (not the case IIRC)
- The domain doesn't exist or lacks an MX
- It is an address from the local domain that is wrong
- Stuff I can't think of right now...
In the first two cases
Email::Valid is a
legitimate tool. I do, however, stand by my answer of
using
Mail::Send or
MIME::Lite instead
of piping into sendmail.
This uses Net::DNS and is hellishly slow if the MX cannot be verified.
Actually this is a case where YMMV depending on a number
of factors. I've used the module extensively under all
sorts of conditions and for the exceptions of some
boundary conditions it has worked well for me. A
misconfigured DNS client or server can cause you problems
but those issues are out of scope here.
Peter L. Berghold -- Unix Professional Peter at Berghold dot Net |
| |
Dog trainer, dog agility exhibitor, brewer of
fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and
a good Belgian ale in your chalice. |