Hi there blue_cowdawg,
Not meaning to tread on your toes but your answer could be a little misleading regarding Email::Valid, E::V cannot validate that the actual address is correct, only that there is an MX record for the domain (which is what I think you meant*) and that the address itself is RFC822 compliant.
/me scuttles away quickly from flying detritus
* This uses Net::DNS and is hellishly slow if the MX cannot be verified. | [reply] |
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. |
| [reply] |
Don't worry... I wear steel toed sandals here at The Monastary! ;-)
Good, glad to hear I didn't offend. And I also concur that Mail::Lite (which is my personal choice) is an excellent module to use rather than piping to sendmail (or any other MTA).
| [reply] |