Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Firstly I know that there were a lot of similar topics. What is more the most of them are advising to use hMailServer. Ok, ok cool! But the main question is how to configure this or that sh*t to work with IIS 7.0 and lolcalhost? I don’t know what the hell should I put into domain name since I have only localhost?! How can I be sure that IIS relaying applications which could send mail via IIS 6.0 can send e-mail after introducing hMailServer and IIS 7.0? How to test that feature?

Can anybody tell me step by step procedure without assuming that I’m administrator and I know what to fill in there? PLEASE HELP!!

share|improve this question
up vote 1 down vote accepted

These docs are the step by step instructions for setting up email on IIS7. No you should not have to (or frankly should) install Hmailserver (why would you need to when you can send mail directly from any windows system even without a relay installed?).

A little detail missing is to ensure that you go into properties of the SMTP server, Click on Access tab and Relay, add an entry for

To test

you can either manually send an email from the machine (telnet to port 25 from the machine etc...) or use a script like this one (powershell)

$emailFrom = ""
$emailTo = ""
$subject = "your subject"
$body = "your body"
$smtpServer = "Localhost"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)

$smtp.Send($emailFrom, $emailTo, $subject, $body)
share|improve this answer
Sorry but I didn't catch it. Firstly I was trying what you advised earlier. I failed. Secondly why are you saying that I don’t need any smtp server installed locally while everyone tells to do this? Please be more precise and give me step by step procedure which works for you. – truthseeker Jul 6 '10 at 21:36
you do need A smtp server somewhere on the network but you do not need a third party SMTP server somewhere available to relay from (you can simply change the smtpserver variable from localhost to the name of the remote smtp server) if you are configuring and installing the smtp service locally. The technet doc I referenced is step by step for setting up the microsoft SMTP server (which is alot simpler than hmailserver) if you have specific questions with a step let me know where you are stuck. – Jim B Jul 7 '10 at 14:46
ok Jim, where do I stuck? The issue is that I have 18 years old application and I can't change the code. I will post you tommorow which classes I'm using. My classes don't wnat to cooparate with IIS 7 and local smtp server. – truthseeker Jul 11 '10 at 17:34
did it work with localhost on iis6? – Jim B Jul 12 '10 at 12:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.