Hello,
Well I think I scared everyone off with the email subject of my last post 
that said ASPMail, so I am trying to get a response this way.

Anyway, I have a COM object and want to talk to it with Win32::OLE. Is this 
do-able.?

I will start here with this question and go from here.
And if it is, I tried the following line and it errored.

#! perl
use Win32::OLE;
my $mailer = Win32::OLE->new("SMTPsvg.Mailer") or die
scalar($Win32::OLE->LastError());
And the error is:
Can't call method "LastError" on an undefined value at 
G:\Inetpub\wwwroot\test4.pl line 5.


Now I can't be sure if SMTPsvb.Mailer is the correct name to put in here, 
but as I mentioned in my last post the following code DOES WORK YES, and 
has that name as a new object.

CODE THAT DOES WORK..........
<html>
<head><title>ASP Mailer Form Test</title><head>
<body bgcolor="white">
<H3 align="center">ASP Mailer Form Test</H3>

Mail  To: <% = Request.QueryString("addressto") %><br>

<p>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")

rem change this RemoteHost to a valid SMTP address before testing
Mailer.RemoteHost  = "208.238.162.123"

Mailer.FromName    = "Scott K Purcell"
Mailer.FromAddress = "[EMAIL PROTECTED]"
Mailer.AddRecipient Request.QueryString("nameto"), 
Request.QueryString("addressto")
Mailer.Subject     = "Asp Mail Server Is Working"
Mailer.BodyText    = Request.QueryString("txtmsg")

if not Mailer.SendMail then
  Response.Write " Mailing Failed... Error is: <br>"
  Response.Write Mailer.Response
else
  Response.Write " sent successfully...<p>"
end if
Response.Write "This component expires: " & Mailer.Expires & "<p>"
%>

</body>
</html>




### 

anyway, I would like to pursue getting this to work with Perl and 
Win32::OLE, so if there are any Win32::OLE people out there, please give me 
a holler back.

Thanks
Scott


---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to