我正在编写代码以通过 CDOSYS 发送电子邮件。我必须在同一个asp页面的不同位置编写电子邮件发送代码。我是否需要在每个代码中使用以下架构链接?如果我在变量中声明它并尝试使用它不起作用并给出错误...我的经典 ASP 网站部署在 Windows Server 2012R2 ( http://schemas.microsoft.com/cdo/configuration
)
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