in reply to Re^4: Sending email in perl
in thread Sending email in perl

$smtp = Net::SMTP -> new('mail.ffinfo.com') is failing so $smtp is not created. Have you got the address of the smtp server right?

As a general comment: you should use warnings; use strict;.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^6: Sending email in perl
by Eagle_f91 (Acolyte) on Sep 16, 2005 at 02:05 UTC
    The code work 100% before my host started requireing authentication. and I do have
    #!user/bin/perl -w use strict; use Net:SMTP;
    I just forgot to highlight that part.

      Are you sure the SMTP server name didn't change at the same time? I get the error message "Can't call method "auth" on an undefined value at noname.pl line 6." when I run the following code:

      use warnings; use strict; use Net::SMTP; my $smtp = Net::SMTP -> new('wibble'); $smtp -> auth('URI', 'PSWD'); $smtp -> quit();

      which strongly implies to me that the new failed and $smtp is undef.

      The use strict; ... remark is like a standard disclaimer around here :)


      Perl is Huffman encoded by design.
        Ok, I am a dumb ass. Feal free to ban me from the internet for life. You where right, the root SMTP address changed. I though since my pop3 cliant still used mail.ffinfo.com fine so could my scripts, but it was not the case for some reason. Called my host to get the address mail.ffinfo.com forwared too and used it. Now I send mail. Thank you so much for you help.