Many applications depend on the internal Windows SMTP Service to relay email confirmations to visitors browsing their web site. When using Windows Server 2012 the SMTP feature must be installed and configured first. Below are the steps for installing the internal Windows SMTP Service.
Install the SMTP Service
1 Launch the Server Manager.
2 From the Dashboard, click on Add Roles and Features to begin the wizard. Click Next on the first screen.
3.Select ‘Role-based or feature-based installation’.
4.Select the server.
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.
8 Click Next to continue past the features selection screen.
9 Click Install to complete the installation.
10 Click Close when the installation has completed.
Configure the SMTP Service
1 Launch the Internet Information Services (IIS) 6.0 Manager.
2 Click Yes to the UAC Prompt.
3 Right-click on SMTP Virtual Server #1 and select Properties.
4 Select the General tab and change the IP Address to the server’s IP address.
5 Select the Access tab and click on the Connection button.
6 In the Connection window, select ‘Only the list below’ and click the Add button.
7 Add the IP address, Group of computers or Domain of the devices permitted to use the internal SMTP, then click OK.
8 In the Access tab of the Connection window, click the Relay button. Add the same permitted devices to the Relay Restrictions list.
9 In the Delivery tab of the Connection window, set an external domain.
10 Launch the Windows Firewall with Advanced Security console.
11 Right-click on ‘Inbound Rule’ and select ‘New Rule’ to begin the wizard.
12 Select ‘Port’ and click Next.
13 Set the local port to 25 and click Next.
14 Choose ‘Allow the connection’ and click Next.
15 Uncheck ‘Public’ to prevent external access to the server. Click Next.
16 Give the rule a name, and click Finish.
17 You should now see a new rule enabled in the firewall management console.
18 In the Server Manager, click on Tools and select Services.
19 In the Services window, double-click on ‘Simple Mail Transfer Protocol (SMTP)’.
20 Stop and then Start the service. Set the Startup type to Automatic.
20 Click OK to finish. The internal SMTP service is now ready and listening.
For further details refer below url :