cdo.message cdoReturnReceiptTo

M

Milton Snider

I tried using the following vbscript to turn on the cdoReturnReceiptTo and
recieved an error: http 500 server error. When I remove the code the script
works fine. This is running on an IIS 5 server in win2000 server. Can
anyone tell me how to make the reciept function work? The BCC doesn't work
either. Can I put more than one address in the .To parameter? Here is the
code.

<html>
<%
Dim MyMail
Dim mypath
mypath = Server.MapPath(Application("FrontPage_VRoot")) & "\email.htm"
Set MyMail = Server.CreateObject("CDO.Message")
With MyMail
.Fields(cdoDispositionNotificationTo) = "(e-mail address removed)"
.Fields(cdoReturnReceiptTo) = "(e-mail address removed)"
.Fields.Update
End With

MyMail.From = "(e-mail address removed)"
MyMail.To = "(e-mail address removed)"
MyMail.Bcc ="(e-mail address removed)"
MyMail.Subject = "Bankruptcy CMECF Operations Forum Registration"
MyMail.TextBody = "TEST EMAIL" & vbCrLf & "Line # 2!" & vbCrLf
MyMail.AddAttachment mypath
MyMail.Fields.Update()
MyMail.Send()
Set MyMail = Nothing
%>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Email and Update</title>
</head>

<body>

</body>

</html>
 
J

Jon Spivey

Hi Milton,

How are you including the cdo constants? Like this?

<!--METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->

Try the receipt part like this

Set cdoConfig = CreateObject("CDO.Configuration")
Set cdoMessage = CreateObject("CDO.Message")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp.you.com"
.Update
End With

With cdoMessage
.Fields(cdoDispositionNotificationTo) = "(e-mail address removed)"
.Fields(cdoReturnReceiptTo) = "(e-mail address removed)"
.Fields.Update
' etc

This certainly works for me
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

insert clickable email address in CDO.Mailer sent email 3
Email problems 12
mail in asp 1
Sending e-mail from a ASP form 6
CDO 0
E-mail web response 6
CDO.Message.1 error '8004020c' 2
CDO.Message.1 error '8004020c' 0

Top