Home > Archive > PERL CGI Beginners > January 2005 > How to send mail using ActiveState and IIS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to send mail using ActiveState and IIS
|
|
| Siegfried Heintze 2005-01-08, 3:55 am |
| The perl script at the bottom was effective in sending email from a Perl CGI
script on Win2K/IIS5. This script does not work anymore because CDONTS is
not supported on our new server running Win2003 Server/IIS6. This VB/ASP
script works on our new server, however:
Set objCDOMail = Server.CreateObject("CDO.Message")
objCDOMail.Sender = "abc@xyz.com"
objCDOMail.To = "def@sls.com"
objCDOMail.Subject = "subject goes here"
objCDOMail.TextBody = "hello"
objCDOMail.Send
Set objCDOMail = Nothing
So I used CDO.Message instead of CDONTS.NewMail in my perl CGI below but
that did not solve the problem. I get no error messages and no email!
Thanks,
Siegfried
$cdonts = CreateObject OLE "CDONTS.NewMail";
# $cdonts = CreateObject OLE "CDO.Message";
$cdonts->{'From'} = $sFrom;
$cdonts->{'To'} = $sTo;
$cdonts->{'Subject'} = "CONVEX Case Evaluation Assignment";
$cdonts->{'BodyFormat'} = &cdonts_constants::CdoBodyFormatHTML;
$cdonts->{'MailFormat'} = &cdonts_constants::CdoMailFormatMime;
$cdonts->{'Body'} = $sBody;
$cdonts->Send();
undef $cdonts;
| |
| Mike Garner 2005-01-08, 3:55 pm |
| Siegfried-
Rather than try to re-invent the wheel, I've used the Mail::Sendmail module
to accomplish this task. I'm also running Server 03, IIS 6 and Active State
PERL. The mail::sendmail module is available on activeState's PPM so its
precompiled and works great for us Windows folks.
Here the link to some documentation:
http://search.cpan.org/~mivkovic/Ma....79/Sendmail.pm
~Mike
-------------------------
Mike Garner
Computer Services, WSC
mgarner@western.edu
voice: 970.943.3123
fax: 970.943.7069
-----Original Message-----
From: Siegfried Heintze [mailto:siegfried@heintze.com]
Sent: Friday, January 07, 2005 3:45 PM
To: beginners-cgi@perl.org
Subject: How to send mail using ActiveState and IIS
The perl script at the bottom was effective in sending email from a Perl CGI
script on Win2K/IIS5. This script does not work anymore because CDONTS is
not supported on our new server running Win2003 Server/IIS6. This VB/ASP
script works on our new server, however:
Set objCDOMail = Server.CreateObject("CDO.Message")
objCDOMail.Sender = "abc@xyz.com"
objCDOMail.To = "def@sls.com"
objCDOMail.Subject = "subject goes here"
objCDOMail.TextBody = "hello"
objCDOMail.Send
Set objCDOMail = Nothing
So I used CDO.Message instead of CDONTS.NewMail in my perl CGI below but
that did not solve the problem. I get no error messages and no email!
Thanks,
Siegfried
$cdonts = CreateObject OLE "CDONTS.NewMail";
# $cdonts = CreateObject OLE "CDO.Message";
$cdonts->{'From'} = $sFrom;
$cdonts->{'To'} = $sTo;
$cdonts->{'Subject'} = "CONVEX Case Evaluation Assignment";
$cdonts->{'BodyFormat'} = &cdonts_constants::CdoBodyFormatHTML;
$cdonts->{'MailFormat'} = &cdonts_constants::CdoMailFormatMime;
$cdonts->{'Body'} = $sBody;
$cdonts->Send();
undef $cdonts;
--
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>
|
|
|
|
|