简体   繁体   English

在Windows 2012 R2 Server Core上从经典ASP发送电子邮件

[英]Sending Email from Classic ASP on Windows 2012 R2 Server Core

We have a classic ASP application we just migrated from Windows 2008 R2 to Windows 2012 R2 Core. 我们有一个经典的ASP应用程序,我们刚刚从Windows 2008 R2迁移到Windows 2012 R2 Core。

Apparently Core versions of windows don't include cdosys or cdonts and thus our application can no longer send email. Windows的核心版本显然不包含cdosys或cdonts,因此我们的应用程序无法再发送电子邮件。

Most of the advice I can find suggests using system.net.mail for sending email which of course is a .NET technology and we're using classic ASP. 我可以找到的大多数建议都建议使用system.net.mail发送电子邮件,这当然是.NET技术,而我们使用的是经典ASP。

We do have .NET on our system but I'm not sure if classic ASP could talk to a .NET page for sending email? 我们的系统上确实有.NET,但是我不确定经典的ASP是否可以与.NET页面进行通信以发送电子邮件?

Besides using a 3rd party COM utility like Persits ASPEmail are there any native ways of working around this? 除了使用Persits ASPEmail之类的第三方COM实用程序之外,还有其他本地方法可以解决此问题吗?

We do NOT want to convert the server core instance to the full version of windows. 我们不想将服务器核心实例转换为Windows的完整版本。 That's killing an ant with a bazooka. 那是用火箭筒杀死一只蚂蚁。 This is only impacting two places in our code and everything else works just fine on core. 这仅影响我们代码中的两个位置,其他所有内容在核心上都可以正常工作。

Unfortunately, CDONTS was superseded by CDOSYS some time ago. 不幸的是,不久前CDONTS被CDOSYS所取代。 When migrating from Windows Server 2008 to Windows Server 2012 I had this exact same issue, but managed to find a fix . 从Windows Server 2008迁移到Windows Server 2012时,我遇到了完全相同的问题,但是设法找到了解决方法

It involves taking a copy of the cdonts.dll file from the Windows Server 2008 Server and adding it to the Windows Server 2012 server then registering it with the relevant COM subsystem without any need to change code or install a 3rd Party library. 它涉及从Windows Server 2008 Server复制cdonts.dll文件并将其添加到Windows Server 2012服务器,然后在相关的COM子系统中注册它,而无需更改代码或安装第3方库。

Hopefully the same method will work with Core but I haven't tested it. 希望相同的方法可以在Core上使用,但我尚未对其进行测试。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM