Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Net::smtp_auth hangs on win32

by WalkingZero (Sexton)
on Aug 24, 2007 at 01:14 UTC ( [id://634766]=perlquestion: print w/replies, xml ) Need Help??

WalkingZero has asked for the wisdom of the Perl Monks concerning the following question:

Hello again. I have transfered my script to win32 due to requirements form up on high. I made a testrun of my script and it hangs. I ripped everything with threads out of it and it still hangs isolating the problem to either Net::SMTP or Net::smtp_auth. Anyone have any ideas on why this would be? Stripped code is as follows:
#!/usr/bin/perl -w use Net::SMTP; use Net::SMTP_auth; %maildrop=( <censored for security> ); sub smtpblast{ my $md= shift; my $user= $maildrop{"$md" . "user"}; my $pass= $maildrop{"$md". "pass"}; print "\n $user \n $pass \n"; my $mailer=Net::SMTP_auth->new('smtp.<censored>.com'); $mailer->auth('Login', $user, $pass); $mailer->mail("$user"); $mailer->to('<censored>'); my $mid= 'MID: ' . $md . " " . `date`; my @data=("Subject: $mid\n", "E-mail Blast message from $user\n"); $mailer->data(@data); $mailer->datasend(); $mailer->dataend; $mailer->quit; print LOGFILE ($mid); } open LOGFILE, ">>messages.log"; &smtpblast("md01");

Replies are listed 'Best First'.
Re: Net::smtp_auth hangs on win32
by syphilis (Archbishop) on Aug 24, 2007 at 01:33 UTC
    Hi WalkingZero,

    Could it be a firewall issue ?

    Have you checked to see at precisely which line the hang occurs ?

    Cheers,
    Rob
Re: Net::smtp_auth hangs on win32
by Corion (Patriarch) on Aug 24, 2007 at 06:26 UTC

    Also, for debugging SMTP issues, I found swaks extremely useful. It's even written in Perl!

      I actually figured out the problem. Ironically I figured it out when I was not only not working on it, but not even thinking about it. I was driving home from a lnog trip tonight and it jsut suddenyl came to me. The date system call doesn't work the same in Windows, and it was waiting for input but never giving me the prompt. As soon as I remove the `date` we have go time! Sorry for the waste of space. Cheers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://634766]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2025-02-07 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (94 votes). Check out past polls.