0
我正在編寫通過CDOSYS發送電子郵件的代碼。我必須在同一個asp頁面的不同地方寫電子郵件發送代碼。我是否需要對每個代碼使用以下模式鏈接?如果我在變量聲明,並嘗試使用它不工作,並給錯誤...我的經典ASP網站部署基於Windows Server 2012R2 (http://schemas.microsoft.com/cdo/configuration
)經典ASP中的CDOSYS電子郵件架構
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailsite
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = websiteemail
mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") =globalpassword