Help for this page

Select Code to Download


  1. or download this
    #  Assuming 'blargh' is an unreachable host.
    perl -MNet::SMTP -e '$m = Net::SMTP->new( "blargh" ); $m->mail( $EVN{U
    +SER} )'
    
    #  produces "Can't call method "mail" on an undefined value at ...".
    
  2. or download this
    Net::SMTP->new( 'blargh' )
      or die $!;
    
    #  produces "Invalid argument at -e line 1".
    
  3. or download this
    Net::SMTP->new( 'blargh' )
      #or die
    ...
      ;
    
    #  produces "Net::SMTP: Bad hostname 'blargh' at -e line 1.".