为什么?

xugang39 2004-12-21 03:22:39

<html>
<body>
<%
recipient = "xugang39@163.com" '此为收信人电子邮箱
' 取得表单资料
name = Request.Form("name")
senderEmail = Request.Form("email")
other=request.Form("other")
subject = "Re:" & Request.Form("subject")
body = Request.Form("body")

if name <> "" and senderEmail <> "" and body<>"" then

' 建立 JMail 组件
set msg = Server.CreateOBject( "JMail.Message" )

' 设定将寄信的过程记录下来
msg.Logging = true
msg.silent = true

' 中文编码设定
msg.Charset = "gb2312"


' 将表单资料存入组件中
msg.From = senderEmail
msg.FromName = name
' smtp认证的关键
msg.mailserverusername="xugang39@163.com" ‘邮箱账户,需完整地址
msg.mailserverpassword="2222" '输入你的邮箱密码

' 将收信人的资料加入组件
msg.AddRecipient recipient

' 设定信件的主题
msg.Subject = subject

' 设定信件的主体内容
msg.body = body & vbcrlf & vbcrlf & "其他联系方式:" & other

' 送出表单资料为电子邮件 ,并指定发信服务器 SMTP
if not msg.Send("mail.163.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "信件成功寄出,谢谢您的留言!!"
Response.write "<a href=javascript:history.go(-1)>返回</a>"
end if

msg.Close
set msg=nothing
else
response.write "请将内容填写完整!!"
end if
%>
</body>
</html>
这些代码哪写的有错误啊!
...全文
35 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yichuan1982 2004-12-21
  • 打赏
  • 举报
回复
有时候,我都真想直接去商场门口发传单,举牌子了
请一定帮忙,谢谢!
请看看:


http://community.csdn.net/Expert/topic/3663/3663763.xml?temp=.569195

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧