jmail邮件发送问题
以下是我的发送邮件代码,jmail组件是4.3的,在一台机器上测试好用,但是当放在另一台机器上和服务器上的时候就是发送不了邮件,不知道原因,至少运行的时候提示“发送邮件失败”,经asp探针测试不到jmail.dll,请大侠帮助。
<!-- #include file="../Connections/conndb1.asp" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
function sendmail(smtp,sendto,subject,body)
On Error Resume Next
Dim jmail
Set jmail = Server.CreateObject("JMAIL.Message")
jmail.silent = true
jmail.logging = true
jmail.Charset = "GB2312"
jmail.ContentTransferEncoding = "base64"
jmail.Encoding = "base64"
jmail.ISOEncodeHeaders = false
jmail.AddRecipient sendto
jmail.From ="DLTVOpinion@dltv.co.jp"
jmail.MailServerUserName ="CHN\DLTVOpinion"
jmail.MailServerPassword ="dltvopinion"
jmail.Subject = subject
jmail.Body = body
jmail.Priority = 3
if jmail.send(smtp)=false then
sendmail="发送邮件失败"
else
sendmail="发送邮件成功"
end if
jmail.Close
end Function
%>
<%
dim title ,content,adddate,uname,filename
dim strSQL,rsObj,rsadd
title=Request.Form("title")
content=Request.Form("content")
adddate=Request.Form("date")
If title="" Then
Response.Write ("<script>alert('申请用户失败!\n\n错误原因:题目未填写。');history.back();</script>")
Response.End()
ElseIf content="" Then
Response.Write ("<script>alert('申请用户失败!\n\n错误原因:内容未填写。');history.back();</script>")
Response.End()
Elseif len(title)>49 then
Response.Write ("<script>alert('添加意见失败!\n\n原因:题目不得超过50。');history.back();</script>")
Response.End()
Elseif len(content)>2000 then
Response.Write ("<script>alert('添加意见失败!\n\n原因:内容长度不得大于2000。');history.back();</script>")
Response.End()
Elseif content<>"" then
response.write sendmail("172.30.100.200","s.wu@dltv.co.jp","有人添加新意见了!","有人添加新意见了,请注意查看")
End if
Set rsadd=server.CreateObject("ADODB.Recordset")
Application.Lock
rsadd.Open "opinion",conn,3,3
rsadd.AddNew
rsadd("title")=title
rsadd("content")=content
rsadd("adddate")=adddate
rsadd("name")=session("UID")
rsadd("url")=session("fn1")
rsadd.Update
Application.UnLock
rsadd.close()
Set rsadd=nothing
CloseConn()
%>
<%
Response.Write "<script>alert('addopinion success!!!');window.location='../Default.asp'</script>"
response.end()
%>