CDO发送邮件的问题
想在网页上发送电子表单,报错。CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/cn/solutions/sendform.asp, line 78
相关源代码
<%@ Language="VBScript" CODEPAGE="65001"%>
<% Option Explicit %>
<%
'set page to expire after 1 minute'
response.expires = 1
Dim strTo
Dim strBody
Dim strSubject
Dim strFrom
Dim strText
Dim lngImportance
Dim ObjMail
dim localCount
dim counter
dim tempString
'Lookup the users IP address to get the name'
dim DNS_query
dim DNS_result
dim DNS
'Set DNS = Server.CreateObject("ASPDNS.DNSLookup")
'Set DNS_query = Request.ServerVariables.Item("Remote_Addr")
'DNS_result = DNS.GetNameFromIP(DNS_query)
'Set DNS = Nothing
strSubject = "Solutions Access"
strBody = "Name: " & request.form("Name")
strBody = strBody & vbCrLf & "Title: " & request.form("title")
strBody = strBody & vbCrLf & "Company: " & request.form("company")
strBody = strBody & vbCrLf & "Phone: " & request.form("phone")
strBody = strBody & vbCrLf & "E-mail: " & request.form("email") & vbCrLf
localCount = 1
counter = 6
tempString = ""
do
if localCount = counter then
exit Do
else
if Request("materialWanted" & cstr(localCount)) <> "" then
tempString = tempString & Request("materialWanted" & cstr(localCount)) & ", "
end if
end if
localCount = localCount + 1
Loop
if tempString <> "" then
tempString = left(tempString,(len(tempString)-2))
tempString = tempString & ", "
end if
strBody = strBody & vbCrLf & "Information requested: " & tempString & vbCrLf
strBody = strBody & vbCrLf & "Other information requested: " & request.Form("other") & vbCrLf
'strBody = strBody & vbCrLf & "Remote Host = " & Request.ServerVariables.Item("Remote_host")
'strBody = strBody & vbCrLf & "Remote Addr = " & Request.ServerVariables.Item("Remote_Addr")
'strBody = strBody & vbCrLf & "IP resolves to = " & DNS_result
'strFrom = " Marketing Page"
'strFrom = "marketing@
strFrom="marketing@
lngImportance = "1"
'strTo="xxxx@
strTo="xxxx@
'Below is the windows XP,2000 way
Set ObjMail = CreateObject("CDO.Message")
objMail.BodyPart.Charset = "UTF-8"
ObjMail.From = strFrom
ObjMail.To = strTo
ObjMail.Subject = strSubject
ObjMail.TextBody = strBody
ObjMail.Send =================================这行错
'Below is the Windows 95,98,ME,NT way
'Set ObjMail = CreateObject("CDONTS.NewMail")
'ObjMail.Body = strBody
'ObjMail.Send strFrom,strTo,strSubject,strBody,lngImportance
Set ObjMail = Nothing
Response.Redirect ("./xxxx/")
%>
之前一个文件,代码跟这个一模一样,就可以运行。
也找过国外的论坛 http://classicasp. 按这个页面的代码改过几次,也不成功。
哪位大侠能帮忙啊?先谢过啦。