in reply to Mail::CheckUser issue

Your expectations do not match those of the module's author:
return _result(CU_SMTP_UNREACHABLE, 'Cannot connect SMTP servers: ' . join(', ', @mservers)); ... sub _result($$) { my($code, $reason) = @_; my $ok = 0; $ok = 1 if $code == CU_OK; $ok = 1 if $code == CU_SMTP_UNREACHABLE; ...

The module's author apparantly decided not to assume a bad address if the server cannot be reached. You'll need to add your own test, i.e.

if (Mail::CheckUser::last_check()->{code} == CU_SMTP_UNREACHABLE) { # can't reach server ... }

Replies are listed 'Best First'.
Re^2: Mail::CheckUser issue
by adrianh (Chancellor) on Aug 27, 2004 at 09:33 UTC
    The module's author apparantly decided not to assume a bad address if the server cannot be reached.

    And, if you want to prevent legal addresses being rejected, it's a good assumption too. An unreachable SMTP server doesn't necessarily mean that the e-mail address is invalid.

      I agree, completely. The only value I see in discarding an email address due to CU_SMTP_UNREACHABLE is when checking from the same IP address from which the email will be sent (e.g. routing and/or blocking issues) for email that is worthless if delayed. (Some kind of alert email, perhaps?).