in reply to Net::SMTP - too much delay...

I can't see why it would take different amount of time depending on the message itself, so I can't answer that. Try running from commandline and see what happens. Now some nitpicking: Your From address is incorrect. It should contain a valid email address. It should at least look like:
From: Mail from website <website@domain>
As other monks have said so often before, use warning, use strict etc etc bla bla.

As long as you don't take $to from the user I don't think there is any risk for spamming anyone but yourself, so I disagree with Anonymous Monks previous node. A bit more errorchecking, and checking for backticks and stuff wouldn't hurt though.

Replies are listed 'Best First'.
Re: Re: Net::SMTP - too much delay...
by Anonymous Monk on Aug 12, 2002 at 10:45 UTC
    I put Debug => 1 and try it from command line and the delay was about 15 seconds.This delay come from the IO::Hadle.

    I tried it a lot of times but the delay was 10-20 seconds.This 2 minute delay is mysterious.

    You are right for the FROM line. I fixed it.

    For the error handling ...etc... you are RIGHT. I must use error handling.

    Thanks fsn..