4

According to this answer it is possible to configure IIS to receive email. That is what I would like to do. But the answer says it's done under IIS SMTP under domains.

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. (I have one more heading which is IIS, but doesn't have any SMTP under it.)

Clicking on SMTP E-mail shows me an option to "Use this feature...when sending e-mail...". 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.

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.)

ispiro
  • 26,556
  • 38
  • 136
  • 291
  • If it's fully hosted you may not have permission to install the SMTP feature. You would have to contact the hosting company to see if they allow this feature. – HackSlash Jun 24 '19 at 22:20

2 Answers2

4

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:

enter image description here

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

enter image description here

which give you IIS 6 (SMTP only)

enter image description here

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?

Julian
  • 33,915
  • 22
  • 119
  • 174
0

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.

jefftrotman
  • 1,059
  • 7
  • 16
  • `it is possible to receive inbound mail. It will write incoming messages to the "Drop" folder.` - that's what I'm looking for. Searching as you suggested didn't help me. – ispiro Jun 16 '19 at 21:28
  • 3
    Take a look at the first section of this page - https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/configure-smtp-e-mail-in-iis-7-and-above. Even though the page is mostly about sending mail, the first section gives details about installing the SMTP service. 1) It's not installed by default, 2) you don't use the regular IIS Manager application to administer it (you have to use the IIS 6 management tool). It may not be installed on your host or you may not have access to the IIS 6 management tool? – jefftrotman Jun 16 '19 at 21:40