简体   繁体   English

配置IIS以接收电子邮件

[英]Configure IIS to receive email

According to this answer it is possible to configure IIS to receive email. 根据此答案 ,可以配置IIS以接收电子邮件。 That is what I would like to do. 这就是我想做的。 But the answer says it's done under IIS SMTP under domains . 但答案说它是在下的IIS SMTP下完成的。

I connected to my website (on a web host) using IIS Manager and the only SMTP option I see is SMTP E-mail under the ASP.NET heading. 我使用IIS管理器连接到我的网站(在Web主机上),我看到的唯一的SMTP选项是ASP.NET标题下的SMTP电子邮件 (I have one more heading which is IIS , but doesn't have any SMTP under it.) (我还有一个标题是IIS ,但它下面没有任何SMTP。)

Clicking on SMTP E-mail shows me an option to "Use this feature...when sending e-mail...". 单击SMTP电子邮件向我显示“使用此功能...发送电子邮件时...”选项。 and it has a textbox for E-mail address and radio buttons to choose from Deliver e-mail to SMTP server and Store e-mail in pickup directory . 它有一个电子邮件地址和单选按钮的文本框,可以选择从电子邮件发送到SMTP服务器将电子邮件 存储在拾取目录中

I don't see any option for allowing it to receive emails. 我没有看到允许它接收电子邮件的任何选项。

So where is the option to receive emails? 那么接收电子邮件的选项在哪里?

(If you have a different way to receive emails without any action taken on them, I'd be glad to hear about it. I want to process the email regardless of the address it's being sent to as long as it's to my domain.) (如果你有不同的接收电子邮件的方式而没有对它们采取任何行动,我会很高兴听到它。我想处理电子邮件,无论它发送到哪个地址,只要它到我的域。)

You need the IIS 6 manager for that - even if you have IIS 7-8-9-10 installed. 您需要IIS 6管理器 - 即使您安装了IIS 7-8-9-10。 The SMTP part is still only in IIS 6 :( SMTP部分仍然只在IIS 6中:(

It's not problem to run them side-by-side and you will use IIS 6 manager only for SMTP 并排运行它们并不是问题,您只能将IIS 6管理器用于SMTP

With this option you could send and receive emails. 使用此选项,您可以发送接收电子邮件。

The IIS 6 manager looks like this: IIS 6管理器如下所示:

在此输入图像描述

And with you Windows system you need to install the SMTP server: 使用Windows系统,您需要安装SMTP服务器:

在此输入图像描述

which give you IIS 6 (SMTP only) 它给你IIS 6(仅限SMTP)

在此输入图像描述

See also https://www.interserver.net/tips/kb/how-to-setup-and-configure-smtp-server-on-windows-server-2008-r2/ 另见https://www.interserver.net/tips/kb/how-to-setup-and-configure-smtp-server-on-windows-server-2008-r2/

And http://www.vsysad.com/2017/05/install-and-configure-smtp-server-on-windows-server-2016/ http://www.vsysad.com/2017/05/install-and-configure-smtp-server-on-windows-server-2016/

and see also How to configure SMTP in IIS 7? 另请参阅如何在IIS 7中配置SMTP?

I have a scenario where I wanted my web application to accept inbound emails and process them. 我有一个场景,我希望我的Web应用程序接受入站电子邮件并处理它们。 I didn't find the SMTP server that comes with IIS to be helpful. 我没有找到IIS附带的SMTP服务器。

What ended up being a much better solution for receiving mail messages for me was to use an inbound email parsing service. 最终成为接收邮件消息的更好解决方案是使用入站电子邮件解析服务。 You configure a domain's MX record to point to their (parsing service provider) mail server and their mail server parses the message and Posts to a page on your web server. 您将域的MX记录配置为指向其(解析服务提供商)邮件服务器,并且其邮件服务器将邮件和邮件解析到Web服务器上的页面。 My ASP.Net MVC Controller Action looks like this: 我的ASP.Net MVC Controller Action看起来像这样:

public ActionResult InboundMessage(FormCollection collection, HttpPostedFileBase attachment1, string attachments, string to, string from)

They get the email and call my code. 他们收到电子邮件并致电我的代码。 I don't have to worry about any of the SMTP details. 我不必担心任何SMTP细节。 I've been using this for several years and it's worked great for me. 我已经用了好几年了,这对我来说很有用。

I'm not sure how recommending a specific product goes over around here, but if you Google "inbound email parser", you'll find several options. 我不确定如何推荐特定产品在这里,但如果你谷歌“入站电子邮件解析器”,你会发现几个选项。

If you want to go the original route, it is possible to receive inbound mail. 如果您想要使用原始路线,则可以接收入站邮件。 It will write incoming messages to the "Drop" folder. 它会将传入的消息写入“Drop”文件夹。 (If you Google "IIS SMTP Drop folder", you will find information about how to do this.) (如果您使用Google“IIS SMTP Drop文件夹”,则可以找到有关如何执行此操作的信息。)

Before I found the Inbound Parse service, I ended up cobbling my own mail server together from some code on found on GitHub, but even then, parsing the parts of a message was a much bigger undertaking than I was expecting. 在我找到Inbound Parse服务之前,我最终从GitHub上的一些代码中将我自己的邮件服务器拼凑在一起,但即使这样,解析消息的各个部分也比我期望的要大得多。

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

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