<%
' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Comments
' get posted data into variables
EmailFrom = Trim(Request.Form("EmailFrom"))
EmailTo = "lloydslanes@googlemail.com"
Subject = Trim(Request.Form("Subject"))
Name = Trim(Request.Form("Name"))
E(-mail Address = Trim(Request.Form("E-mail Address")))
Tel = Trim(Request.Form("Tel"))
Comments = Trim(Request.Form("Comments"))
' validation
Dim validationOK
validationOK=true
If (Trim(EmailFrom)="") Then validationOK=false
If (validationOK = False) Then Response.Redirect("error.htm" & EmailFrom)
' prepare email body text
Dim Comments
Comments = Comments & "Comments: " & Comments & vbCrLf
' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = Name
mail.Subject = Subject
mail.Comments = Comments
mail.Send
' redirect to success page
Response.Redirect("emailsent.htm" & EmailFrom)
%>
what type of error are you getting? I see that you are using CDONTS as your mailing object. CDONTS is very old and not support out of the box by windows 2003 Server and beyond. You might want to look at CDO.message as your mailing object.
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing resource 'file:///C:/Users/Shel/Documents/Uni Work/Year 2/We...
oh ok for the mailing object shall i litterally just change my ("CDONTS.NewMail") for ("CDO.message")?? sorry, but i really dont know asp at all, this is my first time using it lol.
Bookmarks