我用jmail发送邮件,为什么报错?---jmail.Message (0x8000FFFF)

flywishes 2003-08-22 12:44:48
以下是代码。
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>收件人</title>
</head>
<body>
<form action="" method="post" name="form1">
<table width="90%">
<tr><td>收件人</td><td><input type="text" name="receipt" size="20"></td></tr>
<tr><td>发件人</td><td><input type="text" name="sender" size="20"></td></tr>
<tr><td>主题</td><td><input type="text" name="subject" size="35"></td></tr>
<tr><td>内容</td>
<td><textarea name="body" rows="2" cols="35" wrap="soft"></textarea></td></tr>
<tr><td>收件人</td><td><input type="submit" value="发送"></td></tr>
</table>
</form>

<%
if request("receipt")<>"" and request("sender")<> "" and request("subject")<>"" then
set jmail=server.createobject("jmail.message")
jmail.addrecipient request("receipt")
jmail.from=request("sender")
jmail.subject=request("subject")
jmail.body=request("body")
jmail.Send("smtp.sohu.com") '------------------这行报错

jmail.close
set jmail=nothing

else
response.write "必须填写收件人,发件人和邮件主题"
end if
%>
</body>

</html>
...全文
128 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zorou_fatal 2003-08-22
  • 打赏
  • 举报
回复
你的
JMail.MailServerPassword

JMail.MailServerUserName
这两个属性要指定.
比如,你在sohu上有个邮箱名为zorou111
密码为111
那就可以写成
JMail.MailServerUserName="zorou111"
JMail.MailServerPassword="111"

flywishes 2003-08-22
  • 打赏
  • 举报
回复
可以发了,但是我把组件改成jmail3,这个程序是jmail4的写法,这样都可以。想不通
luluso 2003-08-22
  • 打赏
  • 举报
回复
if not msg.Send("用户名:密码@smtp.sohu.com" ) then
喔。打错。上面这句的msg改成jmail
if not jmail.Send("用户名:密码@smtp.sohu.com" ) then

luluso 2003-08-22
  • 打赏
  • 举报
回复
jmail.Send("smtp.sohu.com")
这句改下:
if not msg.Send("用户名:密码@smtp.sohu.com" ) then
Response.write "邮件未能发送</center>"
else
Response.write "成功"
end if
chinesun 2003-08-22
  • 打赏
  • 举报
回复
jmail.Send("smtp.sohu.com") '------------------这行报错

__________________________________________
Jmail.Send()里不用加参数
你把这句改成
Jmail.Send

Jmail.Send()
试试

28,390

社区成员

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

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