Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Making Net::SMTP Robust: Return Codes

Reply
Thread Tools

Making Net::SMTP Robust: Return Codes

 
 
afrinspray
Guest
Posts: n/a
 
      05-27-2005
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.

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?

Thanks,
Mike

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-27-2005
"afrinspray" <(E-Mail Removed)> wrote in
news:(E-Mail Removed) oups.com:

> 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 <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
 
 
 
afrinspray
Guest
Posts: n/a
 
      05-27-2005
Thanks Sinan. I should definitely do my research next time.

You rock!
(http://www.onlineseats.com/upload/co...on_motley2.gif -
motley crue image)

Mike

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write codes to connect access database using html codes hiralcp Software 0 12-18-2007 08:49 PM
How to use file I/o codes with form and controls codes Allen ASP .Net 1 12-03-2007 12:04 AM
Virtual Key Codes, Scan Codes and ASCII Codes in C gj_williams2000@yahoo.co.uk C Programming 2 08-20-2005 11:04 AM
RegEx replace of html codes to ascii codes Greg -- ASP .Net 4 08-09-2005 07:27 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM



Advertisments