全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 4041|回复: 0
打印 上一主题 下一主题

Godaddy windows主机用CDONTS.NewMail发邮件方法

[复制链接]
跳转到指定楼层
1#
发表于 2008-10-19 12:28:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
发送邮箱必须使用godaddy送或者那购买的企业邮局!

代码如下:
<%
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="[email protected]"   注:这里一定要是GoDaddy提供的邮局,否则发送不了
objMail.To="[email protected]"
objMail.Subject="subjec"
objMail.TextBody="body"
objMail.Send
Response.Write "邮件发送成功!"
if Err <> 0 then
response.write "<font color=ff0000>"&Err.Description&"</font>"
response.end
end if
%>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-13 00:50 , Processed in 0.060322 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表