Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Net::SMTP_auth

by Anonymous Monk
on Oct 21, 2010 at 06:28 UTC ( #866481=note: print w/replies, xml ) Need Help??

in reply to Re: Net::SMTP_auth
in thread Net::SMTP_auth

Hi Everyone, I need help too. My code use to work with Verizon (changed providers) but it does not work when I use my own domain. The settings work with my website on the same computer using php so I know the domain and password are valid. This is my error message:
Can't call method "auth" on an undefined value at line 31.

Can someone please help?

Small perl test script below

#!/usr/bin/perl require ""; $title = "my title"; $desc = 'my desc'; $link = ''; $epoch = 1287629117; $file_name = 'file.txt'; $input[2] = ''; &send_mail::send_email ($title, $desc, $link, $epoch, $file_name, \$$i +nput[2]);
Function below
package send_mail; sub send_email (){ my ($title, $desc, $link, $epoch, $name, $emails) = @_; use POSIX qw(strftime); my $est = strftime "%a, %B %d, %Y, %X %z", localtime($epoch); my $smtp = Net::SMTP->new('', LocalAddr => 2626, Timeout => 10, Debug => 1 ); $smtp->auth( '', 'password'); $smtp->mail(''); # use the sender's adress here my @em = split (',',$$emails); foreach (@em){ $smtp->to($_); # recipient's address } $smtp->data(); # Start the mail $smtp->datasend("Subject: " . $title); $smtp->datasend("\n" . $desc . "\n" . $link . "\nListing time: " . $ +est ); $smtp->datasend("\n\n bunch of text here " . $name); $smtp->dataend(); # Finish sending the mail $smtp->quit; # Close the SMTP connection }

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://866481]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2022-01-20 02:33 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.