Configure IIS to receive email

混江龙づ霸主 提交于 2019-12-05 16:35:23

You need the IIS 6 manager for that - even if you have IIS 7-8-9-10 installed. The SMTP part is still only in IIS 6 :(

It's not problem to run them side-by-side and you will use IIS 6 manager only for SMTP

With this option you could send and receive emails.

The IIS 6 manager looks like this:

And with you Windows system you need to install the SMTP server:

which give you IIS 6 (SMTP only)

See also 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/

and see also How to configure SMTP in IIS 7?

I have a scenario where I wanted my web application to accept inbound emails and process them. I didn't find the SMTP server that comes with IIS to be helpful.

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. My ASP.Net MVC Controller Action looks like this:

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. 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. (If you Google "IIS SMTP Drop folder", you will find information about how to do this.)

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!