简体   繁体   English

CDO在网络解决方案上不再在Windows Server上工作

[英]CDO no longer working on Windows Server at network solutions

I am using a server side script using CDO on Network solution that is now failing with a '500 server error' Have they changed their Windows servers? 我正在使用网络上的CDO解决方案使用服务器端脚本,该脚本现在因“ 500服务器错误”而失败,他们是否更改了Windows服务器?

This code works fine on some other domains hosted by Network solutions. 这段代码可以在网络解决方案托管的其他某些域上正常工作。 I tried changing to localhost and the server port to 25 with no luck. 我尝试更改为localhost并将服务器端口更改为25,但是没有运气。

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<% 
Dim cdoConfig, cdoMessage, sch, nProfileID, sFName, sLName, sEmail, sBCC, sFromEmail,    sMessage, Optin

nProfileID = Request.Form("profileID")
sFName = Request.Form("fname")
sLName = Request.Form("lname")
sFromEmail = Request.Form("email")
sMessage = Request.Form("message")
Optin = Request.Form("optin")


'sAction = "email_form_work.asp?profileID=" & nProfileID
sEmail = "m.hill@secretagency.com" 'generic email account *** change to info@bglawde.com
sBCC = "hillcreative@comcast.net"


sch = "http://schemas.microsoft.com/cdo/configuration/" 
Set cdoConfig = CreateObject("CDO.Configuration") 

With cdoConfig.Fields 
    'Set CDO Port 
    .Item(sch & "sendusing") = 1
    'Set mailserver name either IP address, mail.yoursite.com or localhost 
    .Item(sch & "smtpserver") = "smtp.secretagency.com"
    'Set SMTP port which is 25 by default 
    .Item(sch & "smtpserverport") = 2525
    'Set number of seconds before timeout 
    .Item(sch & "smtpconnectiontimeout") = 60


    .update 
End With 

Set cdoMessage = CreateObject("CDO.Message") 

With cdoMessage 
    Set .Configuration = cdoConfig 
    .From = sFromEmail
    .To = sEmail
    .CC = ""
    'use this to send a blind copy 
    .BCC = sBCC
    .Subject = ""
    'Send the email in text format *comment out HTML
    .TextBody = sFName & " " & sLName & " has sent you the following message:" & vbCRLF & vbCRLF & sMessage & vbCRLF
    .Send 
End With
set cdoMessage = nothing
set cdoConfig = nothing


'************ Mail ends here ********************

%>

Problem solved. 问题解决了。 Network solutions Windows Server will only work with CDO when employing Authentication: cdoSMTPAuthenticate, cdoSendUsername, cdoSendPassword must be defined. 网络解决方案Windows Server仅在使用身份验证时才能与CDO一起使用:必须定义cdoSMTPAuthenticate,cdoSendUsername,cdoSendPassword。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检查Volusion Windows服务器上是否支持CDO电子邮件 - Check if CDO e-mail is supported on Volusion Windows server 间歇性的“传输无法连接到服务器” CDO错误 - Intermittent “The transport failed to connect to the server” CDO error 在Excel VBA中使用CDO发送电子邮件不起作用 - Use CDO Send Emails in Excel VBA Not Working CDO / MAPI是否仍可与Exchange 2013一起使用? - Does CDO / MAPI still working with Exchange 2013? Gmail SMTP 服务器停止工作,因为它不再支持“不太安全的应用程序” - Gmail SMTP server stopped working as it no longer support "Less Secure Apps" 如何使用CDO使用VBA发送邮件//邮件服务器是具有代理的Exchange - How to send mail with VBA using CDO // Mail Server is Exchange with proxy 在IIS6中的专用服务器(内存集)上使用cdo和classic asp发送电子邮件? - sending email using cdo & classic asp on dedicated server (memset) in IIS6? VB6中使用CDO/SMTP/TLS发送邮件smtp.office365.com邮件服务器 - Using CDO/SMTP/TLS in VB6 to send email smtp.office365.com mail server 使用plesk服务器12.5 Windows发送codeigniter邮件不起作用 - codeigniter mail sending using plesk server 12.5 windows is not working 在Windows 8.1上无法使用“测试邮件服务器工具” - Can't get “Test Mail Server Tool” working on Windows 8.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM