更好的smtp解決方案
glgxywl 更新時間:2005/9/27 下午 03:25:15
我找了個比書中更好的指定smtp的郵件寄送程序,它不僅可以指定smtp,更可以使用你的用戶名和密碼,這樣,有smtp用戶名密碼的服務器都可以用了。我想文淵工作室在此基礎上開發新的smtp服務插件。謝謝了,因為本人不會開發mxp。<%Const cdoSendUsingMethod="http://schemas.microsoft.com/cdo/configuration/sendusing"Const cdoSendUsingPort=2Const 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=1Const cdoSendUserName="http://schemas.microsoft.com/cdo/configuration/sendusername"Const cdoSendPassword="http://schemas.microsoft.com/cdo/configuration/sendpassword"Dim objConfig ' As CDO.ConfigurationDim objMessage ' As CDO.MessageDim Fields ' As ADODB.FieldsSet objConfig = Server.CreateObject("CDO.Configuration")Set Fields = objConfig.FieldsWith Fields.Item(cdoSendUsingMethod) = cdoSendUsingPort.Item(cdoSMTPServer) = "sony.com" '改成可用的外部邮件服务器域名.Item(cdoSMTPServerPort) = 25.Item(cdoSMTPConnectionTimeout) = 10.Item(cdoSMTPAuthenticate) = cdoBasic.Item(cdoSendUserName) = "hooke" '以上服务器的用户名.Item(cdoSendPassword) = "mypassword" '密码.UpdateEnd WithSet objMessage = Server.CreateObject("CDO.Message")Set objMessage.Configuration = objConfigWith objMessage.To = "F4@meteorgardon.com" '改成接收者的邮件地址.From = "hooke@sony.com" '改成发送人的邮件地址.Subject = "SMTP Relay Test" '标题.TextBody = "SMTP Relay Test Sent @ " & Now() '正文.SendEnd WithSet Fields = NothingSet objMessage = NothingSet objConfig = Nothing%>
文淵閣工作室 更新時間:2005/9/28 下午 12:14:41
感謝您的分享,真的很精彩。
回主畫面