How to set up an Internal SMTP Service for Windows Server 2012 Essentials

Windows Server 2012 Essentials does not come with Microsoft Exchange Server as its predecessor Small Business Server 2011 did. However, many small businesses still use a copier or multifunction device that has the ability to scan to email. Some units also allow a fax to email forwarding service. Unfortunately, many of these devices rely on some form of internal SMTP service to enable them to relay emails to recipients.

Fortunately, you can enable a SMTP service that is built into the core operating system for Windows Server 2012. Here how to do this.

Install the SMTP Service

  1. Launch the Server Manager. From the Search charm, type in Server Manager to find it.


  2. From the Dashboard, Add Roles and Features. The Add Roles and Features Wizard will begin. Click Next on the first screen.


  3. Select Role-based or feature-based installation.


  4. Select the Essentials Server (which should be highlighted by default).


  5. Click Next to bypass the Roles selections.


  6. Scroll down the list and tick the SMTP Server feature.


  7. A new window will pop up to inform you that some other services will also be installed. Click Add Features to confirm and continue. Click Next to continue past the features selection screen.


  8. Click Install to complete the Installation.


  9. Click Close when the installation has completed.


Configure the SMTP Service

  1. From the Search charm, type IIS. Hover your mouse over one of the selections, and run the Internet Information Services (IIS) 6.0 Manager.


  2. Click Yes to the UAC Prompt.


  3. Expand to SMTP Virtual Server #1, right click and select Properties.


  4. General Tab: Set the IP Address to the server’s IP address.


    Note: You can also enable logging is required.


  5. Access Tab: Set the IP for the internal devices in the connection button.


    Add the same IP to the Relay list.


  6. Delivery Tab: Set an external domain – you can use the free customised domain from Microsoft, and you can also optionally add a Smart host, if required. Tick the Attempt direct delivery box, if you want the server to attempt to deliver the email directly first before trying the Smart host.


  7. From the Search charm, type Firewall to locate and run the Windows Firewall with Advanced Security console.


  8. Add a new Inbound Rule. (Right Click on Inbound Rule, and select New Rule)


  9. Select Port.


  10. Type in 25 as the local port.


  11. Click Next (Allow the Connection).


  12. Uncheck Public. (Prevents external access to the server)


  13. Give the rule a name, and click Finish to create the rule.


  14. You should now see a new rule enabled in the firewall management console.


  15. Restart the SMTP Service and set the service for Automatic Start. Open up the Services Management Console. Double Click on the Simple Mail Transfer Protocol service. Stop and then Start the service. Set the Startup type to Automatic.


That’s it. The service is ready and waiting.

NOTE: You can also do this with Small Business Server 2011 Essentials, and also with Windows Server 2012 or Windows Server 2008 R2. With SBS2011 Essentials and Server 2008 R2, there is a slight difference in adding the SMTP Service role, but it is a fairly straightforward task.

68 thoughts on “How to set up an Internal SMTP Service for Windows Server 2012 Essentials”

  1. Thanks for sharing the great knowledge. I have some queries :

    1. How can i send a mail from SMTP in Virtual Image.
    2. I have given the IP as which u have mentioned .Is it correct ?
    3. In smart host i have given . Is it correct ?

    1. You questions are somewhat vague.
      1. Any program capable of using SMTP to send mail can be used to send the email.
      2. The IP mentioned is a sample. You need to use the IP of the Internal Device that will be sending the email.
      3. That is an example. Use your ISP’s SMTP server for the smart host entry.

    1. Your application will send the emails. In the application, you specify this server as the SMTP server.
      The POP3 service is another topic. That is used for receiving emails.

      1. There are quite a number of free POP3 programs available. This blog is primarily designed to enable those who no longer have an on-premises Exchange server to be able to relay emails from their internal devices (photocopiers, server management utility, etc) to their cloud-hosted email service.

    1. Yes, the SMTP service has been around for a very long time.
      No, it is not deprecated and it still works fine in Windows Server 2012.

  2. I am lost at #6. Please give me an example of what I need to place in the FQDN field. Do I type in the servername.mylocaldomainname.local? Or do I type in after the @ on my email – so do I type in that field?

    1. You can use any application. The point of the blog is to enable people to have a SMTP server on-premises, when you do not have a mail server to send mail. This is useful for devices like copiers, and network scanners, and for devices that send monitoring alerts and logs to be able to connect to a mail server inside your network.

  3. thank u for replying…..
    if we configure exchange server 2013 we can send and receive mails…. i have enabled smtp ….
    i am beginner for this… i want learn more … plz help me… wat should i refer….
    plz give me idea….

    1. If you have Exchange Server 2013, you do not need to do any of this. I would suggest that you look for a Microsoft Partner in your area to work with you to configure your systems.

  4. Hi, doing some research on how to setup the SMTP server came across with this board….I have being working on this for weeks now without any luck. It is mentioned above that “You can also do this with Small Business Server 2011 Essentials, and also with Windows Server 2012 or Windows Server 2008 R2. With SBS2011 Essentials and Server 2008 R2, there is a slight difference in adding the SMTP Service role, but it is a fairly straightforward task.”
    well will like to know how to can i set the SMTP in a Windows Server 2008 R2 Standard.
    I’m not an expert on it but very interested in finding out how i can accomplished this task…would like to see if anyone can help me with instructions on how to do this part will definitely appreciate it.

    1. It works the same way.

      In Windows Server 2008 R2, you need to install the SMTP Server Feature, which will add the Web Server (IIS) and Remote Server Administrator Tools roles. After that, open the Internet Information Services (IIS) 6.0 Manager and follow the instructions as per the blog.

    1. The point of the post is to be able to receive emails from an internal device, and then send it on to Office 365 or your other cloud email service. So, you need an inbound rule to receive the email from the internal device, and an external relay to send the email on.

      1. I see, thanks for explaining. So what if I wanted a program running on the server to be able to send emails? Would an outbound rule for port 25 do the trick?

  5. Do you have any troubleshooting tips for when the program can’t send emails? I also tried Telnet but the emails are queued, not sent.

    1. Check the logs – SMTP log and firewall log. If you haven’t enabled them, you will have to do that first. Then you will have a better idea of what is going on.

  6. Thanks. Worked beautifully. This is for my UAT server where I dont need to send email but only to send to the UAT mailroot folder. I only made mistake in setting the server address in my program. Because the sample had server name as, I also thought should set like that. Realize that SMTP. is not a prefix but sample server name. Once I got this right it worked.

  7. What is the function of the FQDN in step 6? SERVERNAME.subdomain.mydomain.local is filled in automatically and when I change it to, the domain name is not valid. The firewall log doesn’t show any blocked traffic. The SMTP log shows timeout – 121. All in all not very helpful, I have no idea how to proceed.

    1. Most anti-spam features now will check your FQDN against the public DNS servers to make sure that the domain is valid. If it is not, your email will be rejected.
      If you want to use, then you will need to make sure this entry is added to the domain zone file for

      1. So, if I understand correctly, an invalid FQDN won’t prevent the message from being sent but from being received. Still I don’t understand why is not valid. It’s an existing subdomain and when I try to add it as a forward lookup zone, I am told it already exists.

        Meanwhile my e-mails don’t get past the queued stage. It’s driving me insane.

        1. You may have a different problem. This will be difficult to diagnose without more information.
          Meanwhile, you can check your domain FQDN from some sites like and

  8. Have followed instructions in blog (thanks) and am sending mails & receiving them to microsoft mail on the Win 2008 r2 server using the free visendo pop service. My question is, this only seems to work when the (virtual) server is connected and has access to the internet. Is there any way that the send / receive process can take place when the server is standalone and not networked in any way?


    1. I’m not sure I understand your question. If you want to use the SMTP mail service as described, the SMTP service has to be able to connect to an external mail server to relay the emails. However, if you want to set up your own internal test environment, then you will need to ensure that your DNS server is also located internally, and will forward the SMTP services to the correct place without connecting to the Internet.

  9. I am developing a mailing application and for now I am using gmail server to send and receive mails simply by writing server name as . Howerver now i want setup my own virtual smtp sever and host the application in my college lab using LAN. Can anyone help me what changes i have to make in order complete my task ?

      1. It is a mailing app in You give your gmail id and password and using gmail port no 587 I m sending mails to any id. Here i am using gmail server authentication and gmail smtp server to send mails, But i want to set up my own virtual smtp server which will fetch messeges from the database server and send it to the other end. I will host the app in my college lab where computers are LAN connected and will create clients to exchange mail between them. They first have to register into the app, create their ids and send mail using smtp server on the server machine. I have the idea but failing to execute. Help needed badly.

  10. An SMTP server does not “fetch” messages. A SMTP server can only receive messages from a sender, and then it “sends” the message on.
    If you want a mail server that can “fecth” messages as well, you should then consider a third party mail server which has POP3 capabilities as well.

    1. Yes i am using pop3 to fetch messages from gmail smtp server. All i want is to set up my own virtual smtp server which will send and receive messages and pop3 will fetch those messages and show it to the client. I want this set up to be a local one as ids created will be identified inside our network only that is college LAN. How to do it.

    2. What is the term “FETCH” use for in here? I am looking a mail server to host my organization mail (Send , received, draft, etc) without using Exchange server. I have the Windows Server 2012 r2

      1. If you are looking for a mail server to host your company email, then this is not the blog for you. You should look at some third party products that can do the job.
        If you are running a small business with less than 25 users accounts, I would suggest that you can get better efficiency and cost savings in deploying a cloud based email solution like Office 365.

  11. Bonjour , j’ai installer le service SMTP sous windows server 2012 mais lorsque j’ouvre IIS je ne peux pas démarrer SMTP un msg d’erreur s’affiche .

    1. Check the blog again to see that you have set up the SMTP service correctly. Also check to make sure you do not already have another SMTP service running on the server.
      What is the error message in the event log?

  12. All seems fine yet when I go to Open up the Services Management Console there is no listing for Simple… nor SMTP nor even Microsoft Simple…
    Any thoughts?

    1. The service name in the Services Console is called Simple Mail Transfer Protocol (SMTP). It should be there if installed properly.

  13. 잘봤습니다. 정보 감사합니다.
    하지만 저는 이해가 되지 않는 몇가지가 있습니다.
    1.iis8에서는 설정할것이 없나요?
    2.웹에서 코드로 발송을 해보셨나요?

    메일로 답변 부탁합니다.

    1. Hi,
      1. The SMTP service is installed on IIS6, not IIS8.
      2. I don’t quite understand what you mean about communicating in code from the web.

  14. I know this is stupid question but I am new in internal mail and i never tried to setup one. This is my first time to setup internal email because we are in a province which we don’t have internet. Anyone can help me, Thank you very much!

    After the installation and configuration. How will I setup that in outlook?
    Like should I put in e-mail address: banez.rodel@myserver.local
    <–(rodel) because this is my username.
    myserver.local is my domain name.

    Account Type: IMAP
    Incoming mail: imap.myserver.local

    Is that correct configuration to be able to send and receive internal email?

    1. This is probably not the right blog post for you to read.
      If you want to set up an internal email system, have a look at some third party POP3 servers. These servers will set up a POP3 service(for receiving email), and SMTP services (for sending email).

  15. I had followed all the steps mentioned above, all the mails are getting stuck in mailroot/queue folder . we are usinh windows 2012 operating system. i was stuck in theis task from past 15 days. can you please help me

    1. What errors do you see in the logs?
      This is usually caused by your server being unable to forward the messages to their destination.
      Check the relay server and DNS.

  16. Hi BoonTee,

    I am getting the below error when i am trying to send the emails . The relay server settings were set as given in the Document. the Smart Host was given as

    Message delivery to the host ‘’ failed while delivering to the remote domain ‘’ for the following reason: An SMTP protocol error occurred.

    Please let me know where i am missing . i can provide the entire screenshots if required



    1. It looks like your upstream relay server is not allowing you to send the emails. A company like this would have specific servers that you are allowed to connect to. You will need to check with their IT department for the correct information.

  17. Thanks a lot. Im using Apache server 2.2, so I wanted to know how to configure SMTP for that. I tried that in many sites with no gain. If you have any idea about that please let me know. It will be really helpful for me. My email ID is
    Thank You

    1. This blog post is about Windows Server 2012, which includes IIS for free.
      Apache is a web server and does not include email features (at least not that I know of). You should consider using a third party smtp program to work with your Apache server.

  18. We installed the SMTP server on our windows 2012 server, we are then sending emails out of our Property Management System about 200 at a time and are getting bounce backs on about 1/3 of them, the default “From” user is an email address through a Microsoft Exchange Server, though the domain of the server is different than MS Exchange Server. Is there a limitation on how many emails can be sent through the MS Exchange server via a remote SMTP connection?

    1. You will need to confirm the limits with your forwarding SMTP server. Often, there is a limit on the number of messages that can be sent in one go. You should also check out the SRV records on the domain to make sure they are correct.

  19. hello,
    i am currently working on a solution which of course requires smtp configurations for emails.i want to knw the difference between an internal SMTP and ISP smtp configurations.


  20. I have setup the SMTP service on a server 2012 server. I want to use this as an internal relay for scan to email and to send reports from an application to internal users. I also want to have the application send out emails to external users. Is this where the smart host would come into play, to send out externally?

  21. Hi BoonTee,
    In your post on MAY 27, 2014 AT 8:52 AM, you suggested finding a 3rd party POP3 server which has a SMTP Service for sending email. What is the difference in that SMTP service and the SMTP server/service which comes with IIS? Can the IIS SMTP not just send email without Relaying it to another email service?
    I’m trying to create a way for a simple application to send emails. This app does not have the ability to be configured with security, ports, and such. It’s only parameter is ‘email server name’. Can I get IIS SMTP to do this, or do I need to find another application – and if so, can you, or someone recommend a good, reliable, free one?


    1. The comment I was replying to was from Rodel R. Banez. He wanted to set up a mail server where he could receive AND send email. SMTP is a standard protocol, and there isn’t much difference in using either. If you deploy a third party email system, it will probably incorporate some sort of SMTP server as well.

      1. Thanks BoonTee. This is a great blog, and very helpful!

        So then to make sure I’m clear, I should be able to set up the SMTP on IIS to be able to just send email and not relay it through some other existing email server/account?


        1. Yes, you can set up SMTP on IIS to send mail without a relay.
          However, be careful that many spam filters may reject this if you do not have your MX records and domain records configured properly.

  22. Hi, I’ve set up windows server 2012 running on Oracle VirtualBox on a Windows 8.1 OS to allow me to test SSIS 2012. I’m trying to use the SMTP service as shown on this page but am struggling to tell whether it is working or if outgoing emails are being blocked locally, by my host OS, or by my ISP.
    I am seeing this Event: Message delivery to the host ‘’ failed while delivering to the remote domain ‘’ for the following reason: The connection was dropped by the remote host.
    When I try and use PowerShell to send a test email [Send-MailMessage -SMTPServer localhost -To -From -Subject “This is a test email” -Body “Hi, this is a test email via PS”] I get the following error:
    Send-MailMessage : Unable to read data from the transport connection: net_io_connectionclosed
    I’ve tried using a domain I own as the Advanced Delivery Fully-qualified domain name; and also my local ISP SMTP details. Neither seems to be working.
    Can you advise the steps I need to take to trouble shoot this?

    1. You need some tools to check where the issue lies.
      Port scan tools may help. Also, try using some of the online tools.
      It could also be due to spam filtering on the recipient mail servers.

Leave a Reply

Your email address will not be published. Required fields are marked *

− three = 2

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>