M型windows虚拟主机CDOSYS发信组件代码参考
发布日期:2015-12-4 16:12:18
CDOSYS示例:
<%
'以下部分为系统配置,请勿更改
Set objMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\Inetpub\mailroot\Pickup"
objCDOSYSCon.Fields.Update
Set objMail.Configuration = objCDOSYSCon
'系统配置结束
'以下为用户自行更改部分,请由程序员进行修改
objMail.From = "you@yourhouse.com"
objMail.Subject = "CDOSYS Mail Message"
objMail.To = "yourfriend@otherdomain.com"
objMail.TextBody = "Hello World"
objMail.Send
Set objMail = Nothing
Set objCDOSYSCon = Nothing
%>
版权声明:本示例程序仅仅授权中国万网 ASP.NET 虚拟主机用户使用,其他任何方式的使用均需经中国万网书面授权。