[Neworleans-pm] Sending Mail via Perl on Win32

Dave Cash dave at gnofn.org
Tue Oct 12 11:43:34 CDT 2004


On Sat, 9 Oct 2004, Donnie Cameron wrote:

> 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.

Erin,

This is good advice.  I concur with the idea of isolating the
different suspects and seeing which one is doing the crawling.

> 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.

Another option is to use Apache for Win32.  And if you still have
some slowness, you could even get mod_perl running with it to help
speed things up (mod_perl is super fast, but definitely a resource
hog).  I'd stick to Apache 1 if you decide to go this route.

> 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.

Another approach here is to just have Net::SMTP or Mail::Sender (my
mail module of choice, BTW) connect to a remote SMTP server that
will allow you to relay through it (such as another one on your LAN,
preferably on a *nix machine) and you may see some performance
improvement that way.

Good luck.  I'm sure we'd all love to know what the problem ends up
being and what solution path you choose.

Take care,

Dave

/L\_/E\_/A\_/R\_/N\_/T\_/E\_/A\_/C\_/H\_/L\_/E\_/A\_/R\_/N\
Dave Cash                              Power to the People!
Frolicking in Fields of Garlic               Right On-Line!
dave at gnofn.org                                  Dig it all.


More information about the NewOrleans-pm mailing list