Installing SMTP Server Feature on Windows 2008 is an easy process requiring only few steps to complete. On this article we will describe a step by step configuration and installation of the SMTP Server feature and how to enable the smtp to relay from local server.
Step 1:
Opening Server Manager Console and under Features select Add Features
Step 2:
Selecting SMTP Server option
Step 3:
Click on Install wait until finish and click close
Step 4:
Waiting for installation to finish and clicking on Close
Step 5:
Opening IIS 6.0 Manager under Administrative Tools -> Internet Information Services 6.0
Step 6:
Under [SMTP Virtual Server] second mouse click and properties
Step 7:
Select Relay under Access Tab
Step 8:
Select Only the list below and click on Add button
Step 9:
Enter IP Address 127.0.0.1 for relay
Step 10:
Sending a manual email through telnet to confirm everything working successfully. Telnet localhost 25 or telnet yourpublicip 25 and make sure you open the specific port on your firewall to be available to public.



















































Kiyokodyele

















January 13, 2009
Is there a way to move SMTP from the default C:\Inetpub location. Would like to move to another drive and directory as I have in W2K3 / IIS6
[Reply]
January 26, 2009
It’s a good stuff …..
[Reply]
January 29, 2009
Many thanks to the author.
[Reply]
hardeep banga Reply:
May 13th, 2009 at 6:29 am
it is very beneficial for me. Thanks you.
[Reply]
February 5, 2009
very good tutorial…easy to understand..thanks
[Reply]
May 5, 2009
I installed the IIS role, rebooted, and still do not see SMTP available in Features. Any ideas to resolve this would be greatly appreciated.
[Reply]
May 11, 2009
check if you have IIS6 installed. IF so, open , and enable virtual smtp server.
[Reply]
May 12, 2009
I have successfully configured SMTP server on Windows server 2008. I have created an account and able to send messages outside using telnet. Tell me where i will find incoming messages on this server. Do i have to configure inbox? or anything else. Please help.
[Reply]
Glafkos Charalambous Reply:
May 12th, 2009 at 6:21 pm
Check c:\inetpub\mailroot folder
[Reply]
Babur Mansoor Reply:
May 13th, 2009 at 9:59 am
Thanks!
Sent a number of mails from three different accounts like hotmail to this account and all folders under mailroot are still empty. Is there any restriction on incoming mails? or i have to configure something to get incoming?
[Reply]
Mathiau Reply:
September 30th, 2009 at 7:16 pm
This is only for the SMTP server, to receive email you need to setup a POP3 email server
SMTP is really only for sending.
[Reply]
May 15, 2009
Thank you Glafkos for sharing this information.
I have a server as a VM running under Hyper-V where it is a member of a local domain, say corp.contoso.local which is defined on another VM acting as AD and DNS server.
I have followed the steps you described above and performed the email submission from my hotmail account to my gmail account and vice versa. However, my messages just end up in the queue and do NOT leave. I turned off the Windows Firewall on my SMTP server but it didn’t help.
Do you have any idea what possibly could be the cause for this behavior?
Thanks
Amir
[Reply]
June 18, 2009
Excellent tutorial.
Cristian
[Reply]
July 1, 2009
Just wanted to say thanks for this. Very few articles about Server 2008 online and this worked perfectly.
[Reply]
July 31, 2009
Excellent walkthrough, could not be easier to follow
[Reply]
August 1, 2009
nice and very informative information
[Reply]
August 24, 2009
Excellent, Very good ilustration
[Reply]
September 22, 2009
mails stays in queue folder? i don’t know why? i’m using at&t? anyone can help?
i have a real IP and i want to know how to configure it too to sen email using my server
[Reply]
October 12, 2009
Thanx, its really work
.
[Reply]
October 27, 2009
Really good article, very useful.
Thanks a ton
[Reply]
October 28, 2009
wow! This works perfects !!!
[Reply]
November 2, 2009
can you create multiple smtp accounts for an office and use server 2008 as an internal mail server for sending mail out? IE: LAN mail routed across network and external mail sent out via smtp server?
[Reply]
November 9, 2009
Worked seamlessly, thank you.
[Reply]
November 11, 2009
I have followed these steps very carefully and I still receive Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay when trying to run a php script and the same response when trying to run it through telnet. I have windows sbs 2008 with iis7. I know most of the work was in iis6, and have performed those tasks.
When trying to test this using telnet, it does connect to the smtp server, but after entering the rcpt to … it sends the relay error.
Could this have something to do with port forwarding of my router? Windows firewall did generate an smtp exception in the exceptions list… is this enough?
I know this thread is pretty old, but could you please help me?
[Reply]
JPineda Reply:
November 16th, 2009 at 9:51 pm
Instead of 127.0.0.1, enter the actual IP address of the server you are sending from, in the Relay screen. (Step 9 above)
[Reply]
December 4, 2009
Thanks for the article, you also need to add the Telnet Client feature.
[Reply]
Glafkos Charalambous Reply:
December 8th, 2009 at 8:26 am
The Telnet Client future is only added to demonstrate that everything is working properly but thanks for pointing this out.
[Reply]
December 16, 2009
How I can set multiple emails account, can somebody explain me and really new in this
[Reply]
December 30, 2009
Clagkos, than for the detailed installation. Very good. In my case I encountered an error. The IIS 6 mgr shows the SNTP virtual server, but it has a red X on it and cannot start it. The Event log shows Error: “Event 115, SMTPSVC, The Service could not bind instance 1″.
I run SBS 2008 with Exchange2007 and trying to get the PHP mail() function to work. My problem is that my WordPress registration does not work because the mail cannot be sent to the person who registers.
In addition, I am running LSoft’s LISTSERV but I was able to get only the web interface to work but cannot deliver mail.
Please contact me.
We are a non-profit Hellenic organization. THANX!
[Reply]
Glafkos Charalambous Reply:
December 30th, 2009 at 11:12 am
Hello Thanos,
The service error you are getting is because port 25 is already in use by some other application. You can’t run SMTP Server with Exchange, maybe that is your problem.
To get the PHP mail() function to work you need to edit the following setting in your php.ini
[mail function]
SMTP = mail.domain.com
sendmail_from = admin@domain.com
Regards,
Glafkos
[Reply]
January 11, 2010
Thanks for this simple guide to setting up SMTP service on Windows – I would also add that you might need to have a suitable domain alias configured under the ‘domain’ sub-setting if you try to test the email option through telnet, where you enter a series of commands into the command prompt like this:
Start > Run > “Type ‘cmd’ then hit enter”
####
enter each line below and hit enter, one at a time, except for the email message body at the end.
####
telnet localhost 25
HELO
mail from:yourname@yourdomain.com
rcpt to:recipientemailaddress@example.com
data
(after you type ‘data’ and hit enter, you enter the email message, i.e. ‘mail test’ and to end the message and send it, you hit enter, type a period and hit enter again)
{ENTER-KEY}
.
{ENTER-KEY}
At this point the window will confirm the message has been queued for sending if everything went well, then you just check your inbox to see if the mail arrived.
[Reply]
Mohinder Reply:
November 3rd, 2010 at 1:30 am
Mails are still in queue folder I am not able to receive them in my inbox. Pls help
[Reply]
January 22, 2010
once enter in step 9 assing on internet ip address or server ip address
[Reply]
February 17, 2010
How do I make the smtp server start with computer? its installed and everything but I have to start it manually.
[Reply]
raton Reply:
June 27th, 2010 at 10:21 pm
Same for me. Great article, VERY helpful and very well written. Any info about how to make the SMTP server start with the computer?
[Reply]
a friend Reply:
February 24th, 2011 at 6:41 pm
change the “Simple Mail Transfer Protocol (SMTP)” service to start automatically. (Administrative Tools -> services)
[Reply]
February 20, 2010
Great! Works on first try. Thanks.
[Reply]
March 22, 2010
Great! Works on first try. Thanks.
[Reply]
April 11, 2010
Thanks a lot. i will send mail from php script with out any error.
but i have another issue atm.
when i check my inbox also spam folder there is no have any mail ?
any suggestion ?
[Reply]
April 19, 2010
thank you, but my windows 2008 server does not contain smtp feature
[Reply]
May 5, 2010
It works perfectly and save me the day. Thanks a lot for this article.
[Reply]
May 21, 2010
Works like a charm
Thanks
[Reply]
May 25, 2010
in Server 2008 you have to use Add Features, not Add Roles. Server Manager will also add the IIS6 Components needed. (stupid thing asks if you want them – you HAVE to, else it wont work)
Dont forget to get the Security Updates from Microsoft (which require a reboot).
Good Article.
[Reply]
May 26, 2010
Works Fine!! Thanks !!
Any Recomendation for a POP3 server???
[Reply]
May 31, 2010
fantastic article.. thanks mate for spending time and writing a great piece…
[Reply]
August 5, 2010
How would I set up the SMTP so that it relays messages out to another SMTP server?
[Reply]
August 6, 2010
You the man now dog! Great article, thanks for posting it!
[Reply]
August 20, 2010
I having problem with the Smtp server.
I host a personal server behind my company firewall.
I use this server to test the Gemini function.
I fail to send email out from the server cause all the port is block by my company firewall.
Anyway that i send the email within my company LAN?
so I able to test the email is functioning?
[Reply]
September 22, 2010
at&t blocks port 25…
[Reply]
September 29, 2010
THANK U THANK U THANK U THANK U..
man at last it worked …..
[Reply]
October 14, 2010
Worked perfectly, thanks.
[Reply]
October 20, 2010
The smtp services does not start with iis 6.0 on Win 2008 svr. 1721 error not enough resources …. I tried to edit the registry to change the vaule under internet; but could not locate the internet folder … . Is there any other way to troubleshoot the same … ??
[Reply]
October 26, 2010
I am using powerMTA as an SMTP server, where i have to configure at my windows 2008 server as a my default SMTP server. or configure it any where else and how
[Reply]
November 4, 2010
I found I’d left out steps 7-9 until I read this guide – thanks very much!
[Reply]
November 25, 2010
mail reside in queue??
in c:/inetpub/mailroot/queue ??
any idea to solve it??
[Reply]
December 8, 2010
How do you setup an account for authorized domain users to send email from this SMTP 2008 R2 Server? I only want domain users to be authorized to use the SMTP Server. How do you do that? Please advise….
Dale
[Reply]
December 11, 2010
well done
[Reply]
January 14, 2011
thanks lot for the tutorial, it works on me when i’m try to send message the status send is done theres no problem but when i check my inbox for a day theres no message at all.
[Reply]
January 26, 2011
i’m am trying to get PHP Mail to work on IIS7/Server2008 i installed SMTP
however nothing with Mail works. PHP.ini is there and working, PHPinfo.php works.
please help me 3 1/2 weeks i’m ready to cry
[Reply]
February 18, 2011
Hi,
First, thanks for tutorial.
Actualy, i can send mails from telnet, but i cant send using php.
i tried to enter my SMTP ip to php.ini file, but it didnt work.
What can i do now?
Thanks.
[Reply]
February 18, 2011
I have successfully installed SMTP Server Feature on Windows server 2008, and mail server works well. However when I reboot computer, all email can’t be send out, the email message files are all staying at C:\inetpub\mailroot\Pickup directory. When I uninstall SMTP server and re-install it again. Mail server function can be back to normal. Does anyone know how can I solve this problem? It is painful every time reboot computer, I will have to re-install SMTP.
[Reply]
February 22, 2011
i installed SMTP server but i am unable to send mail vis send mail form (HTML) i think its have some prob. but tell me how i check it on my end
[Reply]
February 22, 2011
Already set the above instructions. But I didn’t get the mail, Any Solutions
Thanks
[Reply]
March 27, 2011
Worked perfectly, thanks.
[Reply]
March 27, 2011
Many thanks to the author.
[Reply]
April 8, 2011
Thanks! But I cannot send an email in telnet. when i do rcpt to:[mail address] then he does nothing. I have disable Firewall, and on the modem all outgoing messages do have acces. What i do wrong?
[Reply]
April 11, 2011
i done the installation as u have insturcted .everything is goig smothely but
when i use telnet . The mail is going to sify and office webmail ,but not gmail and yahoo mails.
its going into the queue
how can i resolve the issue
[Reply]
April 18, 2011
Really a nice walk thru….
[Reply]
April 18, 2011
Thank you for the info on Installing and Configuring this.
I find it very helpful.
Mark
[Reply]
April 27, 2011
thanks sir
[Reply]
May 19, 2011
hello
i Have configer php.ini (smtp server )
Is Not Working
Pls Help Me
[Reply]
May 20, 2011
The first part of your instructions pertains to Windows Server 2008 where you talk about adding the SMTP server feature. This I have done.
However on step 5 I am instructed to open IIS 6 Manager. IIS 6 is not included with Windows Server 2008. In my (IIS7) Manager there is no option for server properties on the context menu and SMTP virtual server is not mentioned anywhere.
How do I configure the SMTP service in IIS7 on Windows 2008?
[Reply]
May 24, 2011
Thanks! Worked like a charm…
[Reply]
May 25, 2011
first of all thanks for this tuto
but i did everythings in this tuto for install my smtp server but when i want to check it whit telnet i have this message ” could not connect to localhost on port 25: connection failled”
someone help me.
[Reply]
May 26, 2011
Gracias, muy buen tutorial…
[Reply]
June 7, 2011
Hi,
I made everything like is described and send e-mails, but only with “Thunderbird”, and “Ability mail server”. My problem is a user registration in PHPBB3 forum system, wich do not send confirmation e-mails.
The server is a virtual machine with Windows Server 2008 / XAMPP / IIS /PHPBB3 – that is all on the server.
SMTP are started on the server. Ports 465, 110, 25 are opened.
Please tell me how to send confirmation mail for PHPBB3 registration?
Kind regards
[Reply]
July 1, 2011
Big Thank you, sorted in minutes with this.
[Reply]
July 20, 2011
The mail is going to sify and office webmail ,but not gmail and yahoo mails.
[Reply]
July 20, 2011
I have the exact same problem–the mail messages are ending up in the queue directory and never leaving. Did you ever resolve this problem? Does anyone have a solution? How can I get the emails to leave the queue and go to their intended recipients?
[Reply]
klotom Reply:
September 15th, 2011 at 5:53 pm
Did you get this figured out. I have moved my SMTP relay from IIS 6 to 7 and have the exact same problem. internet mail builds up in the queue folder
[Reply]
Edgar Reply:
February 1st, 2012 at 6:48 pm
I had the some problem, because I config the name of Domain equal at institutional domain, simply I changed smtp domain to any else and now all works
[Reply]
August 8, 2011
it good one and its saves my time
[Reply]
August 10, 2011
I had done the same. I had entered the IP of local PC from where i want to send email through sql server, However my SMTP actual server is different.
So could you confirm which server IP i have to given in relay part, Also i am not able to telnet actual SMTP server on port 25
[Reply]
August 17, 2011
It’s a good stuff ….
[Reply]
August 25, 2011
Brilliant! Thanks for the post!
[Reply]
August 26, 2011
Thx fot these clear instructions. Where do I configure a different REPLY_TO adress? Since I have no pop3 configured people cannot reply to the from adress. (From adress in my case cannot be the same as the reply to adress, because of firewall restrictions of the reply to domain).
[Reply]
October 4, 2011
Thanks a lot…..Its helpful
[Reply]
October 8, 2011
I can not get real mail. could not figure out the problem
[Reply]
November 2, 2011
Man, 3 years later and this article is still helping people. You can tack another Thanks on your wall from me.
[Reply]
November 2, 2011
telnet is not recognized command.. what shall i do next?
[Reply]
Mike Reply:
February 8th, 2012 at 9:56 pm
Jerry,
You have to install the “Telnet Client” feature in the Server Manager console.
Administrative Tools > Server Manager > Add Features > Telnet Client
[Reply]
Jerry Reply:
May 17th, 2012 at 9:56 am
Thank you so much for replying back. Even it takes long time I still appreciated it so much. Now I can finished installing SMTP to my server.
[Reply]
November 4, 2011
hi!,I love your writing very a lot! share we keep up a correspondence more about your post on AOL? I require an expert in this house to resolve my problem. Maybe that is you! Taking a look forward to peer you.
[Reply]
November 4, 2011
Thanks for the steps. I was able to setup a SMTP server. But I am finding some issue and that is if I am sending a mail to any of my gmail or yahoo account I am able to do so, but if I send a mail to my official email ID it will fail. I will receive a message like
“Diagnostic-Code: smtp;550 Access denied – Invalid HELO name (See RFC2821 4.1.1.1)”
Why so? What could be the problem?
Please help
[Reply]
November 6, 2011
Great blog right here! Also your site lots up fast! What host are you the usage of? Can I am getting your associate link to your host? I desire my site loaded up as quickly as yours lol
[Reply]
November 7, 2011
That is very interesting, You are an overly professional blogger. I have joined your rss feed and look forward to in quest of more of your wonderful post. Additionally, I have shared your website in my social networks
[Reply]
November 8, 2011
Your post got it working for me, thanks! I am having some issues understanding and configuring relaying. I can send emails to one external email account, but not to some others. For example, sending emails to hotmail accounts always fails.
Any ideas?
[Reply]
Glafkos Charalambous Reply:
November 8th, 2011 at 4:01 pm
Make sure your IP Address is not blacklisted or has a bad reputation and also u need to have a reverse PTR record
[Reply]
November 16, 2011
This will do the same thing:
dism /online /enable-feature /FeatureName:Smtpsvc-Admin-Update-Name
dism /online /enable-feature /FeatureName:Smtpsvc-Service-Update-Name
dism /online /enable-feature /FeatureName:DirectoryServices-ISM-Smtp
[Reply]
November 19, 2011
Worked perfectly. Now all of our network services can send me email alerts when things break. Thanks!
[Reply]
November 25, 2011
Thank U!
[Reply]
December 31, 2011
very good & detailed post..
[Reply]
January 11, 2012
Works perfectly! Thanks
[Reply]
January 27, 2012
Thanks, very clear and helpful!
[Reply]
February 2, 2012
Thanks.
This was most beneficial.
[Reply]
February 3, 2012
I know its a really old post however it helped us like anything…thanks a ton…very nicely done…n its QED…thanks Glafkos Charalambous
[Reply]
February 9, 2012
Spelling correction… hate this interface…For those who are able to send emails externally but not internally. You need to add a mycompany.com domain in your IIS6 SMTP Relay choosing remote pointed to corp-exch1 (do a netstat to find the real name) which will then intercept those internal corporate email addresses.
[Reply]
March 21, 2012
Thanks!!!
[Reply]
March 24, 2012
That is really interesting, You’re a very professional blogger. I have joined your rss feed and look forward to searching for more of your fantastic post. Additionally, I’ve shared your web site in my social networks
[Reply]
April 13, 2012
Thanks man!!
[Reply]
May 2, 2012
Thanks heaps. Helped out a lot!
[Reply]
May 10, 2012
Thanks, great stuff. Worked first try.
[Reply]
May 11, 2012
I have never thought it would be that much easy. Thanks !
[Reply]
May 14, 2012
very helpful thanks a lot
[Reply]
June 19, 2012
Great tutorial. Perfect solution for my need! Thanks!
[Reply]