У меня небольшая проблема, так как я не знаю, asp.Но страницы, созданные для моего сайта дяди, в asp, и форма тоже.У меня возникли проблемы с получением его формы, я проверил ошибки и нашел pdf от fasthost, и я пробую этот код, но не понимаю, куда я положил свой адрес электронной почты, чтобы отправить информацию, а также как добавить другую информацию, такую как имя,
Это код, который я пытаюсь:
dim oCdoMsg, oCdoConfg, strReferer, strServer,
strClientIP, strServerIP, blnSpam
set oCdoMsg = server.createobject("CDO.Message")
strReferer = request.servervariables("HTTP_REFERER")
strServer = Replace(request.servervariables("SERVER_NAME"), "www.", "")
strClientIP = request.servervariables("REMOTE_ADDR")
strServerIP = request.servervariables("LOCAL_ADDR")
strFrom = "noreply@" & strServer
intComp = inStr(strReferer, strServer)
If intComp > 0 Then
blnSpam = False
Else
' Spam Attempt Block
blnSpam = True
End If
oCdoMsg.to = request.form("email")
oCdoMsg.from = strFrom
oCdoMsg.Subject = "CDO Test Mail"
oCdoMsg.Textbody = "This test mail has been sent from
server "
oCdoMsg.Textbody = oCdoMsg.Textbody &
request.servervariables("LOCAL_ADDR") & " via CDO mail
objects."
strMSSchema =
"http://schemas.microsoft.com/cdo/configuration/"
Set oCdoConfg = Server.CreateObject("CDO.Configuration")
oCdoConfg.Fields.Item(strMSSchema & "sendusing") = 2
oCdoConfg.Fields.Item(strMSSchema & "smtpserver") =
"smtp.fasthosts.co.uk"
oCdoConfg.Fields.Update
Set oCdoMsg.Configuration = oCdoConfg
If NOT blnSpam Then
oCdoMsg.send
strResult = "Mail Sent."
Else
strResult = "Mail Not Sent."
End If
response.write strResult
set oCdoMsg = nothing
set oCdoConfg = nothing
Буду признателен за любую помощь в этом, код, который находится на сайте прямо сейчас, показывает ошибку 500.Вот почему мне нужно использовать код выше.Мне просто нужна помощь с тем, куда добавить адрес электронной почты моего домена и как ввести другие части формы, такие как имя, в приведенный выше код.
Спасибо