October 11, 200917 yr Hi Guys i am trying to create an ASP contact from for a customer as there hosting server does not have php installed and they dont want to pay the extra money to do so. I have tried to create a ASP contact form for which when you fill the details out on the form and click send it comes up with message sent but there is no message arriving in the inbox from the site. Please look at the script below and advice please The server details im trying to connect to are Mail POP3 - pop.clara.net SMTP Relay Record - smtp-vh.clara.net Webmail & Mail Filters - toaster-vh.clara.net Here is the script [color="#2E8B57"]<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>contact_us.asp</title> <style type="text/css"> <!-- .style1 { color: #0066CC; font-weight: bold; } --> </style> </head> <body> <p align="center"> <% Const cdoSendUsingMethod = _ "http://schemas.microsoft.com/cdo/configuration/sendusing" Const cdoSendUsingPort = 2 Const cdoSMTPServer = _ "http://schemas.microsoft.com/cdo/configuration/smtpserver" Const cdoSMTPServerPort = _ "http://schemas.microsoft.com/cdo/configuration/smtpserverport" Const cdoSMTPConnectionTimeout = _ "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" Const cdoSMTPAuthenticate = _ "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" Const cdoBasic = 1 Const cdoSendUserName = _ "http://schemas.microsoft.com/cdo/configuration/sendusername" Const cdoSendPassword = _ "http://schemas.microsoft.com/cdo/configuration/sendpassword" Dim objConfig ' As CDO.Configuration Dim objMessage ' As CDO.Message Dim Fields ' As ADODB.Fields Dim FirstName, Surname, Email, Website, Message FirstName = Request.Form("FirstName") Surname = Request.Form("Surname") Email = Request.Form("Email") Website = Request.Form("Website") Message = Request.Form("Message") ' Get a handle on the config object and it's fields Set objConfig = Server.CreateObject("CDO.Configuration") Set Fields = objConfig.Fields ' Set config fields we care about With Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "< toaster-vh.clara.net >" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPConnectionTimeout) = 10 .Item(cdoSMTPAuthenticate) = cdoBasic .Item(cdoSendUserName) = "< something@co.uk >" .Item(cdoSendPassword) = "< password >" .Update End With Set objMessage = Server.CreateObject("CDO.Message") Set objMessage.Configuration = objConfig With objMessage .To = "< enquiries@website.co.uk >" .From = "< enquiries@website.co.uk >" .Subject = "SMTP Relay Test" .TextBody = "SMTP Relay Test Sent @ " & Now() & vbCrLf & "Surname: " & Surname & vbCrLf & "First Name: " & FirstName & vbCrLf & "Email: " & Email & vbCrLf & "Message: " & Message .Send End With Set Fields = Nothing Set objMessage = Nothing Set objConfig = Nothing %> </p> <p align="center"><img src="images/Contactlogo.png" width="414" height="40" /></p> <p align="center" class="style1"><a href="something&CanoeHire.html">Click Here to Return to Home Page </a></p> </body> </html>[/color]
Create an account or sign in to comment