人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統下載站 > 技術開發教程 > 詳細頁面

運用CDO通過外部郵件服務器發郵件 (免安裝其他郵件組件)

運用CDO通過外部郵件服務器發郵件 (免安裝其他郵件組件)

更新時間:2022-06-29 文章作者:未知 信息來源:網絡 閱讀次數:

使用CDO通過外部郵件服務器發郵件 (免安裝其他郵件組件)
John Peterson [ hooke 編譯 ]

  WIN2K下的CDO或CDONTS被默認配置成只能通過本地的Microsoft SMTP服務來發送郵件,如果要用外部的郵件服務器,一般要安裝第三方組件。以下代碼教你如何利用CDO通過外部郵件服務器發送郵件。(譯者win2000下測試通過。)

<%
Const cdoSendUsingMethod="http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort=2
Const cdoSMTPServer="http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort="http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic=1
Const cdoSendUserName="http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword="http://schemas.microsoft.com/cdo/configuration/sendpassword"

Dim objConfig' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields

Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields

With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer)= "sony.com"'改成可用的外部郵件服務器域名
.Item(cdoSMTPServerPort)= 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate)= cdoBasic
.Item(cdoSendUserName)= "hooke" '以上服務器的用戶名
.Item(cdoSendPassword)= "mypassword" '密碼
.Update
End With

Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig

With objMessage
.To = "F4@meteorgardon.com"'改成接收者的郵件地址
.From = "hooke@sony.com"'改成發送人的郵件地址
.Subject= "SMTP Relay Test"'標題
.TextBody = "SMTP Relay Test Sent @ " & Now() '正文
.Send
End With

Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統下載排行

網站地圖xml | 網站地圖html
主站蜘蛛池模板: 高安市| 玉树县| 新疆| 鲁甸县| 定州市| 青浦区| 古田县| 舒城县| 中山市| 慈利县| 福建省| 安陆市| 丹阳市| 平山县| 祁连县| 伊川县| 沿河| 武汉市| 阿克陶县| 沅江市| 青铜峡市| 旺苍县| 太保市| 襄垣县| 胶州市| 景洪市| 昔阳县| 延庆县| 乌拉特后旗| 资中县| 襄城县| 阳春市| 比如县| 南木林县| 广汉市| 镇平县| 文成县| 和平区| 宜阳县| 广平县| 南通市|