下面的问题如何解决?

在学习的过程中出现了如下的问题:

源代码为:

1 Option Explicit 
 1<html>
 2<head>
 3<title> 发送Email</title>
 4</head>
 5<body>
 6<h2 align="center">发送Email</h2>
 7<center>
 8<form action="" method="POST" name="form1">
 9<table width="90%">
10<tr><td>收件人</td><td><input name="Receipt" size="20" type="text"/>**</td></tr>
11<tr><td>发件人</td><td><input name="Sender" size="20" type="text"/>**</td></tr>
12<tr><td>主题</td><td><input name="Subject" size="35" type="text"/>**</td></tr>
13<tr><td>内容</td>
14<td><textarea cols="35" name="body" rows="2" wrap="soft"></textarea></td></tr>
15<tr><td>附件</td><td><input name="file" size="25" type="file"/></td></tr>
16<tr><td></td><td><input type="submit" value=" 发送 "/></td></tr>
17</table>
18</form>   

'判断,如果收件人,发件人和主题都不为空,则继续发信
If Request("Receipt")&lt;&gt;"" and Request("Sender")&lt;&gt;"" and Request("Subject")&lt;&gt;"" Then
Dim Jmail '因为开头强制所有变量需声明,所以这里必须先声明Jmail变量
Set Jmail = Server.CreateObject("Jmail.SMTPMail")
Jmail.AddRecipient Request("Receipt")
Jmail.Sender = Request("Sender")
Jmail.Subject = Request("Subject")
Jmail.Body = Request("body")
If Request("file")&lt;&gt;"" Then
Jmail.AddAttachment Request("file") '附件
End if
Jmail.ServerAddress = "smtp.263.net" 'SMTP发信服务器,请换成你的
Jmail.Execute '执行发送
Jmail.Close '关闭对象
Response.Write "成功发送"
Else
Response.Write "必须填写收件人、发件人和邮件主题"
End If

1</center>
2</body>
3</html>

错误提示为:
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

服务器对象 错误 'ASP 0177 : 800401f3'

Server.CreateObject 失败

/asptemp/chapter10/10-1.asp,行24

无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp

---------------------------------------------------------------

你注册了Jmail组件吗?没有就去注册吧
---------------------------------------------------------------

Set Jmail = Server.CreateObject("Jmail.SMTPMail")
他报的是此行错误,因为你的电脑里没有注册Jmail组件
---------------------------------------------------------------

??什么问题?没看见?
---------------------------------------------------------------

yes
---------------------------------------------------------------

http://www.bzmc.edu.cn/download/fl.asp?fl=18
帮你找了一个网址,有jmail组件下,试试看吧

Published At
Categories with Web编程
Tagged with
comments powered by Disqus