Forum Moderators: open

Message Too Old, No Replies

CDOSYS mail

i cant make work a script

         

coer

4:32 pm on May 23, 2007 (gmt 0)

10+ Year Member



i saw in this forum a script and i see is similar to many others on the google but dont work any for me if i put on my server tell me taht error:

The website cannot display the page
HTTP 500
Most likely causes:
The website is under maintenance.
The website has a programming error.

What you can try:
Refresh the page.

Go back to the previous page.

More information

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.

The script is this:

<%
'Dimension variables
'Dim objcdosysCon , objcdosysmail, Body
Dim myCon , mymail, Body
'Create the e-mail server object
Set mymail = Server.CreateObject("CDO.Message")
Set myCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server
myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
myCon.Fields.Update

'Update the cdosys Configuration
Set mymail.Configuration = myCon

mymail.From = "info@yahoo.com"
mymail.To = "test@yahoo.com"
mymail.Subject = "Your Subject"

Body = "Dear " + "User"+ ","
Body = Body + " <html>"
Body = Body + " <body>"
Body = Body + "<p>Your mail script is working fine."
Body = Body + "...</p> "
Body = Body + "</body></html> "

mymail.HTMLBody = Body
mymail.Send
'Close the server mail object
Set mymail = Nothing
Set myCon = Nothing
Response.Write("Your mail was sent")
%>

UFfan

4:12 pm on May 29, 2007 (gmt 0)

10+ Year Member



Change 127.0.0.1 to the name/address of your exchange sever.