Entry
What's the best way to generate and send mail using Perl and Windows?
Dec 4th, 2002 19:07
Ryan Buterbaugh, Jack Nerad, Jasmine Merced, Stan Wong, http://www.indigostar.com/sendmail.htm
The perl module MIME::Lite is useful for this.
use MIME::Lite;
# windows doesn't have sendmail, so send via smtp
$MIME::Lite->send('smtp','smtp.myisp.net',Timeout => 60);
# make the message
$msg = MIME::Lite->new(To => 'you@yourhost.com',
From => 'me@myhost.com',
Subject=> 'Hello',
Type => 'TEXT',
Data => 'The message goes here');
# send it
$msg->send();
For more information, see the MIME::Lite module documentation.
http://search.cpan.org/doc/ERYQ/MIME-Lite-2.117/lib/MIME/Lite.pm
Previous answer:
You can also download the demo version of Sendmail for Windows at
http://www.indigostar.com/sendmail.htm. The registration fee is
currently $49. I prefer Sendmail because after installing Apache,
Perl
and Sendmail using the same file structure as my Linux server, the
program can be uploaded and run without modifying any configuration
files for the location of these programs.