[Neworleans-pm] Sending Mail via Perl on Win32

Donnie Cameron donnie at solomonstreet.com
Sat Oct 9 00:23:12 CDT 2004


Hi Erin,

The first thing I would do is determine if other scripts take a long 
time to execute. Try running a CGI script that loads a couple of common 
packages (like the CGI package, for example), but not the NET::SMTP or 
Mail::Sender packages. If the script takes a long time to return a Web 
page, then the problem is not related to sending mail, but rather to 
loading and running Perl.

If it turns out that your server is running Perl scripts slowly, there 
are a couple of things you can try to speed the scripts up 
significantly. I won't go into detail because I can't remember how to do 
it, but you can load the entire Perl interpreter into a RAM disk.

Another thing you can try is getting rid of IIS and loading something 
like the Xitami server, which is small, fast, and easy to configure (you 
have to do almost nothing in terms of configuration to get it running). 
I did this once because IIS was running too slowly and discovered that 
Xitami provided a huge (20X) increase in speed. I think you need a 
special license for IIS in order for the HTTP server to perform adecuately.

If, on the other hand, it turns out that the slowness is due to SMTP, 
you could try putting another SMTP server in place. Or, you could write 
a program that uses MAPI to send the message. There might be a Perl 
module out there for MAPI. If not, you could write the MAPI part in 
another language (such as C++, VB, or C#) and then execute it from your 
Perl script. MAPI is slow, but certainly not in the order of tens of 
seconds.

--Donnie

Erin Laine wrote:

> I'm developing a Perl script on NT4 that processes web form input 
> including the collection of an email address. I want to send an email 
> back to the user to confirm the address they entered is working.
> 
> I'm using the Net::SMTP Perl package, and it works, but the response 
> time after the user submits the form until my "thank you" page is 
> displayed is about 30 seconds. Either the NET::SMTP package is slow or 
> the path to my SMTP server is. I've tried the Mail::Sender package with 
> similar results.
> 
> So I'm think of having the confirmation email sent at a later time.  
> Maybe a Perl script running as an NT service that monitors a directory 
> for files with a certain extension.  These files would be created at 
> form processing time and would contain the info needed to send the 
> confirmation email.
> 
> If you are still following this, does this sound like a reasonable 
> approach?  Or can you recommend something that might be better?
> 
> Thanks.
> 
> Erin Laine
> ... feeling clumsy on NT
> _______________________________________________
> NewOrleans-pm mailing list
> NewOrleans-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/neworleans-pm
> 


More information about the NewOrleans-pm mailing list