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/Mail-Sendmail-0.79/Sendmail.pm

~Mike
-------------------------
Mike Garner
Computer Services, WSC
[EMAIL PROTECTED]
voice: 970.943.3123
fax: 970.943.7069
-----Original Message-----
From: Siegfried Heintze [mailto:[EMAIL PROTECTED] 
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 = "[EMAIL PROTECTED]"
  objCDOMail.To = "[EMAIL PROTECTED]"
  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to