Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Net::smtp_auth hangs on win32

by WalkingZero (Sexton)
on Aug 24, 2007 at 01:14 UTC ( #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");

Comment on Net::smtp_auth hangs on win32
Download Code
Re: Net::smtp_auth hangs on win32
by syphilis (Canon) 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 ?

Re: Net::smtp_auth hangs on win32
by Corion (Pope) 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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2014-07-29 13:26 GMT
Find Nodes?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:

    Results (217 votes), past polls