For Programmers: Free Programming Magazines  


Home > Archive > ASP > February 2005 > "CDO for Windows 2000 Library" on an XP server









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 "CDO for Windows 2000 Library" on an XP server
Luis

2005-02-23, 8:55 am

I use CDO to send an email to users as part of a 'Reset
Password' functionality I have on a intranet site.

I use:
METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-
00C04FB1625D" NAME="CDO for Windows 2000 Library"
in my asp page to send the e-mail (via Exchange 2003). It
works fine if I host the site on a Windows 2000 box, but I
recently upgraded my dev box to Windows XP (SP1) and the
functionality has stopped working - the email does not get
sent to the user. If I Response.Write the err.Description
it returns "Object required".

The send mail code is:

<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-
00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
<%
On Error Resume Next
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "My Exchange Server
Name"
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "Me<me@mail.com>"
.To = UserMail 'this value gets pulled
from the db as per users details
.Subject = "Test"
.TextBody = MailMsg
.HTMLBody = MailMsg
.Send
End With

If err.number Then
Response.Write("<h2>Password Error</h2>")
Response.Write(err.Description)
End If

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>

Should I be using "CDO for Windows 2000 Library" on a XP
box?

Is there a "CDO for Windows XP Library"?

Has the problem got anything to do with me trying to send
mail via Exchange 2003?

Ray Costanzo [MVP]

2005-02-23, 3:55 pm

Have you looked in your SMTP directory on the machine to see if the mail is
sitting in the queue? Anything in the event logs saying that mail can't be
relayed or something like that, perhaps?

Ray at work

"Luis" <andyza@webmail.co.za> wrote in message
news:054b01c519a1$5c092760$a401280a@phx.gbl...
> I use CDO to send an email to users as part of a 'Reset
> Password' functionality I have on a intranet site.
>
> I use:
> METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-
> 00C04FB1625D" NAME="CDO for Windows 2000 Library"
> in my asp page to send the e-mail (via Exchange 2003). It
> works fine if I host the site on a Windows 2000 box, but I
> recently upgraded my dev box to Windows XP (SP1) and the
> functionality has stopped working - the email does not get
> sent to the user. If I Response.Write the err.Description
> it returns "Object required".
>
> The send mail code is:
>
> <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-
> 00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
> <%
> On Error Resume Next
> Set cdoConfig = Server.CreateObject("CDO.Configuration")
> With cdoConfig.Fields
> .Item(cdoSendUsingMethod) = cdoSendUsingPort
> .Item(cdoSMTPServer) = "My Exchange Server
> Name"
> .Update
> End With
> Set cdoMessage = Server.CreateObject("CDO.Message")
> With cdoMessage
> Set .Configuration = cdoConfig
> .From = "Me<me@mail.com>"
> .To = UserMail 'this value gets pulled
> from the db as per users details
> .Subject = "Test"
> .TextBody = MailMsg
> .HTMLBody = MailMsg
> .Send
> End With
>
> If err.number Then
> Response.Write("<h2>Password Error</h2>")
> Response.Write(err.Description)
> End If
>
> Set cdoMessage = Nothing
> Set cdoConfig = Nothing
> %>
>
> Should I be using "CDO for Windows 2000 Library" on a XP
> box?
>
> Is there a "CDO for Windows XP Library"?
>
> Has the problem got anything to do with me trying to send
> mail via Exchange 2003?
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com