| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 958 人关注过本帖
标题:CDO发送邮件的问题
只看楼主 加入收藏
sys7910
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2011-10-10
收藏
 问题点数:0 回复次数:1 
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.  按这个页面的代码改过几次,也不成功。

哪位大侠能帮忙啊?先谢过啦。
搜索更多相关主题的帖子: 电子 网页 address invalid 源代码 
2011-10-10 17:53
sys7910
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2011-10-10
收藏
得分:0 
自己顶一下,请高人赐教呀!!万分感谢
2011-10-11 09:40
快速回复:CDO发送邮件的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.035621 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved