When I run the following ASP email script I get error. I am sending the script and error messege both. Please help me as soon as possible as I am a fresher at ASP scripting.
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' After an instance of NewMail Object has been created.
' If you like you can use this one line of code to send the mail.
' objNewMail.Send From, To, Subject, Message
' or you can give every value seperate
' Please replace the "From" and "To" email addresses with your
' own valid email address. I recieve too many emails
' from people who test this sample and keep sending
' emails to email@example.com, or they keep the "From" property
' as firstname.lastname@example.org and I get response of
' undeliverable emails.
' NOTE: If the "To" or "From" properties of CDONTS contain
' invalid email address you will not recieve the email.
objNewMail.Subject = "This is a test Mail"
objNewMail.Body = "This is the Body text of this test mail."
' After the Send method, NewMail Object become Invalid
' You should set it to nothing to relase the memory
Set objNewMail = Nothing
' If you want to send another mail
' you have to create a new instance of NewMail Object again.
Response.Write "Email has been sent"
The error message:-
Microsoft VBScript compilation (0x800A0400)
/calendar/email2.asp, line 11