[提问]
vds vps 程序发邮件,怎么发不了,在别的都好好的,郁闷死了
|
|
用JMAIL也发不了,郁闷死了, 换了N多代码都不行
注:JMAIL跟CDONTS我都有装上去
http://jmail.ptym.cn/aspcheck.asp
http://jmail.ptym.cn/jmail.asp?MailBody=w
错误的地方都是在.Send 这个地方
Dim objCDO
Set objCDO=Server.CreateObject("CDONTS.NewMail")
objcdo.MailFormat=0
objcdo.BodyFormat=1
objCDO.To= "274755@qq.com"
objCDO.Importance=2
objCDO.From="274755@qq.com"
objCDO.Subject="测试而已!"
objCDO.Body="您已经收到从WEB上发送的邮件"
objCDO.Send
SetobjCDO=Nothing
On Error Resume Next
sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"
' Set the mail server configuration
Set objConfig=CreateObject("CDO.Configuration")
objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort
objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"
objConfig.Fields.Update
' Create and send the mail
Set objMail=CreateObject("CDO.Message")
' Use the config object created above
Set objMail.Configuration=objConfig
objMail.From="ym@123.com"
objMail.To="hotde@126.com"
objMail.Subject="NEw Email" '信件主题
objMail.TextBody=MailBody
objMail.Send
这个也不行
Set objMail = Nothing
if Err <> 0 then
response.write "<font color=ff0000>"&Err.Description&"</font>"
else
Response.Write "邮件发送成功!"
end if |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-1-7 15:46:50
|
显示全部楼层
换为gmail或者Hotmail地址试试呢
还有不成功有什么错误提示? |
|
|
|
|
|
|
|
|
|
|
zzsui
发表于 2010-1-7 16:53:08
|
显示全部楼层
|
http://jmail.ptym.cn/jmail.asp?MailBody=w 这个是发邮件 |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-1-7 17:01:38
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
zzsui
发表于 2010-1-7 17:58:38
|
显示全部楼层
|
|
|
|
|
|
|
|