Help for this page

Select Code to Download


  1. or download this
    my $smtp = Net::SMTP->new('smtp.orcon.net.nz',
                               Timeout => 30,
                               Debug   => 0,  # Prevent debug info to STDO
    +UT
    ...
    $smtp->quit;
    
    print "Operation was ", $res ? '' : 'un', "successful.\n";
    
  2. or download this
    use Net::SMTP;
    
    my $smtp = Net::SMTP->new('smtp.example.com',
    ...
    print "(Got response: ", $smtp->message(), ")\n";
    
    $smtp->quit;