I was wondering if you could possibly help me...
But I have been trying to set up a website for a friend using an earlier website that I owned, which had a reponse form written in asp and I had hoped that by altering the website and e-mail information I would be able to use the script for my friend's website.
The asp form which leads to my wsendmail.asp does not work. The form is visible but the wsendmail.asp page cannot be displayed.
From my reading of things it would seem that the script (which dates back a few years) has CDONT(?)as a component and that this is not supported by easyspace.com (where the website is being hosted) as it is now considered to be a security threat.
The code I have been using is below - if some one could very kindly alter the "CDONT" to "CDO.Message" and put the "<br />" _ where the should be and anything else that you think might be necessary I would greatly apreciate it.
<%@ Language=VBScript %>
<%
dim strFail
dim strName
strName=Request.Form("Name")
strEadd=Request.Form("Email")
dim strMessage
strMessage = ""
dim objEMail
dim strSubject
strSubject = Request.QueryString("subject")
if strSubject = "" then
strSubject = "Your Memo To Us Web Response Form"
strMessage = strMessage & "Name: " & Request.Form("Name") & vbcrlf
strMessage = strMessage & "Address: " & Request.Form("address") & vbcrlf
strMessage = strMessage & "E-mail Address: " & Request.Form("Email") & vbcrlf
strMessage2 = "Submitted via your website at: " & time & " on " & date & "." & vbcrlf _
& "The following request for information has been received from your website" & strMessage
Set objEmail = Server.CreateObject("SMTPsvg.Mailer")
objEmail.FromName = "mywebsite.co.uk"
objEmail.FromAddress = "
administrator@mywebsite.co.uk"
objEmail.RemoteHost = "smtp.easyspace.com"
objEmail.Recipient = "
myemail@btconnect.com "   ;
objEmail.Subject = strSubject
objEmail.BodyText = strMessage &n bsp;
if not objEmail.SendMail then
strFail="Mailer error: " & objEmail.Response _
& "<br>" & Replace(strMessage,vbcrlf,"<br>") _
& "<br><a href='javascript:history.go(-1)'>Go back</a>"
Response.Write(strFail)
end if
' Set objEMail = CreateObject("CDONTS.NewMail")
' objEmail.Cc = "
administrator@mywebsite.co.uk"
' objEMail.Send "
administrator@mywebsite.co.uk","myemail@btconnect.com",strSu bject,strMessage 'strFrom, strTo, strSubject, strMessage
end if
Set objEMail = Nothing
if Err.number <> 0 then
Response.Write ("The following error occurred: " & Err.description )
else
bSent = true
end if
if strEadd <> "" then
isAdd = true
Set objEmail = Server.CreateObject("SMTPsvg.Mailer")
objEmail.FromName = "mywebsite.co.uk"
objEmail.FromAddress = "
administrator@mywebsite.co.uk"
objEmail.RemoteHost = "smtp.easyspace.com"
objEmail.Recipient = strEadd   ;
objEmail.Subject = "Your Message To Me"
objEmail.BodyText = "Thank you for completing the online form."
if not objEmail.SendMail then
strFail="Mailer error: " & objEmail.Response _
& "<br>" & Replace(strMessage,vbcrlf,"<br>") _
& "<br><a href='javascript:history.go(-1)'>Go back</a>"
Response.Write(strFail)
end if
' Set objEMail = CreateObject("CDONTS.NewMail")
' objEMail.Send "
administrator@mywebsite.co.uk",strEadd,"Message","Thank you for your message." 'strFrom, strTo, strSubject, strMessage
Set objEMail = Nothing
if Err.number <> 0 then
Response.Write ("The following error occurred: " & Err.description )
else
bSent2 = true
end if
Set objEmail = Server.CreateObject("SMTPsvg.Mailer")
objEmail.FromName = "mywebsite.co.uk"
objEmail.FromAddress = "
administrator@mywebsite.co.uk"
objEmail.RemoteHost = "smtp.easyspace.com"
objEmail.Recipient = "
myemail@btconnect.com "   ;
objEmail.Subject = "Message from one of your Website"
objEmail.BodyText = "Thank you! We have just received a message."
if not objEmail.SendMail then
strFail="Mailer error: " & objEmail.Response _
& "<br>" & Replace(strMessage,vbcrlf,"<br>") _
& "<br><a href='javascript:history.go(-1)'>Go back</a>"
Response.Write(strFail)
end if
' Set objEMail = CreateObject("CDONTS.NewMail")
' objEMail.Send "
administrator@mywebsite.co.uk",strEadd,"Message","Thank you for your message." 'strFrom, strTo, strSubject, strMessage
Set objEMail = Nothing
if Err.number <> 0 then
Response.Write ("The following error occurred: " & Err.description )
else
bSent2 = true
end if
end if
'Response.redirect ("thanks.asp?name=" & strName)
%>