私はaspを知らないので小さな問題があります。しかし私の叔父のウェブサイトのために作成されたページはASPにあり、フォームも同様です。私は仕事に自分のフォームを取得する問題を抱えているとエラーを検索し、fasthostからpdfを見つけたと私はこのコードをしようとしているが、私は情報を送信するために私の電子メールアドレスを置くと名前などの他の情報。ASPフォームフォームに他のフィールドを追加したり、フォームに他のフィールドを追加したりする
これは私がしようとしているコードです:
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 = "[email protected]" & 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エラーが表示されます。だから私は上記のコードを使用する必要があります。ドメインの電子メールをどこに追加するか、名前のようなフォームの他の部分を上記のコードに取り込む方法については、助けが必要です。
おかげ