Re: Making Net::SMTP Robust: Return Codes



"afrinspray" <afrinspray@xxxxxxxxx> wrote in
news:1117217817.512543.124510@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

> How do I get return codes from Net::SMTP commands? For example, I'd
> like to know if the recipient returns a 450 or 550 error on any of the
> Net::SMTP steps.

If you look at the documentation for Net::SMTP:

<URL: http://search.cpan.org/~gbarr/libnet-1.19/Net/SMTP.pm>

you will see:

SEE ALSO
Net::Cmd

Then, looking at

<URL: http://search.cpan.org/~gbarr/libnet-1.19/Net/Cmd.pm>

you will notice the ok, code, message, and status methods.

> Will it error out if one of these codes is returned? So if I put it in
> an eval, will the $@ contain a "450 could not connect" type of
> message?

See above.

Sinan

--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
.



Relevant Pages

  • Making Net::SMTP Robust: Return Codes
    ... How do I get return codes from Net::SMTP commands? ... like to know if the recipient returns a 450 or 550 error on any of the ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: SQLPLUS Question
    ... Just a small warning re some of these more "advanced" uses of sqlplus: ... codes from hosted commands. ... Otherwise you'll see every command in a shell started from sql*plus ... Shell Commands from 10g Version of Sqlplus". ...
    (comp.databases.oracle.server)
  • Re: need help regarding text printing on linux
    ... >>> taken as commands not the text to be printed. ... The PoS application I maintain as part of my job embeds the codes ... I'd go for a simple in-application driver ... Roger Leigh ...
    (uk.comp.os.linux)
  • Re: FS q command
    ... can't print bitmaps. ... so I'm trying to use standard ESC/P commands to do it. ... It contains a full table of 'ESC' codes ... print to screen in debug mode which is distinctly handy. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Suggestions for X10/Automation Widgets
    ... >>>The modified CM15A is exactly the framework to implement a security RF ... >Another poster commented on stray RF commands from neighbors. ... Two codes would be sufficient to prevent accidental codes. ...
    (comp.home.automation)