Shortcuts

Setting up SMTP on IIS 7

Great, IIS7 is supposed to make my life easier, right? WRONG! I have just spent about 3hr trying to figure out how to setup SMTP virtual server. I have the SMTP running but IIS manager doesnt show the virtual smtp server like in iis6.

--->My app is now sending emails. The first email spent about 30 min in the Queue folder, but after that, each email is sent straight away. (this is working for testing purposes, i am not sure if i should use this setup in a production environment - please
advise)

Re: Setting up SMTP on IIS 7

Mate! Get one thing very clear in your mind right now if you wanna be an IT devloper ...

Nothing microsoft makes your life easy! Especially upgrades.

They encourage you to upgrade at every turn, but trust every time you do something will break, and not just any something, microsoft technologies will break other already established microsoft technologies.

The MS heads would argue, but first answer this ...

1: Who in their right mind would change the packaged mail interface fom CDONTS, to CDO, to NOTHING, with each web server upgrade thus making (how many? Millions of) websites broken. What world has the resources to cope with such epic scale code upgrades?

2: Who in their right mind would encourage a technology upgrade that CHANGES WEBPAGE NAMES from *.asp to *.aspx? Do they get that millions of established websites have spent years making links all over the web to their sites, only to have MS in their wisdom
try their hardest to UNDO ALL OF THEIR HARD WORK?

Mate Ive been a developer for 15 years and if you want my advise, install Apache on your windoze OS and learn how to use it - ONCE ONLY. You can then use some sensible languages and technologies very easily and with portability. You can configure Apache
to leave your pages named *.asp so your web links still work. Apache supports everything you will ever need. Free. IIS is a babies suckie toy next to Apache.

Soon you will also ditch the windoze server OS for a linux server OS and your life will be bliss.

You can all dispute all you like but honestly MS are idiots who have been continually making developers lives hell for their entire history and wont learn. The only reason Im here is because a client of mine requires that I maintain their ASP site, if thats
even a sentence.

Re: Setting up SMTP on IIS 7

Re: Setting up SMTP on IIS 7

Hello, i am trying to setup iis 7 with smtp server from 2 weeks, but i couldn't i searched alot on the internet for help but i didn't enough help to setup i installed iis7 on windows vista also installed smtp free server and smart mail tools can you tell me
step by step how to setup iis 7 with smtp i will be really grateful

Re: Setting up SMTP on IIS 7

You need to install a mail server (I use hMailServer which is open source and great) read the doco, understand it, and set it up as per your requirements.

Then, the mail server is completely unrelated to your IIS and runs as a service - usually on ports 25 for SMTP, 110 for POP, and 143 for IMAP. YOU WILL NEED TO SELECT "Start->Control Panel->Allow a program through the firewall" AND MAKE ENTIRES FOR EACH
SAID PORT.

Then, you will call the mail service as follows, depending on your code language : -

For Classic ASP you will use one of CDONTS or CDO (Google them for examples).

Re: Setting up SMTP on IIS 7

I'm not sure what you are talking about. Vista / Win7 don't have a SMTP server available, IIS has a way to configure for applications to forward messages. That is in IIS manager.

As far as SMTP feature, you have to make sure you allow local host send message by adding the IIS_IUSRS or application pools full access to the c:\inetpub\mailroot\pickup folder. Secondly, your ISP has to allow port 25 access to send email. mail servers
totally rely on DNS for resolution, if something isn't working, enable logging and see what the error is.

Re: Setting up SMTP on IIS 7

Using the virtual SMTP server in IIS 6 on Server 2008 is not any more precarious than running any other SMTP server, in both cases you will need to make sure that you have the correct security settings in place to avoid being an open relay target. Granted,
the SMTP server built in to Windows Server is a pretty no-frills option, and you could get better secure options in a third party SMTP application (like Secure Authentication for remote callers), but it should work fine for most applications that need SMTP
capability.

I have to remark as well about the comment below that suggests all MS patches break existing stuff blah blah...I have been managing Windows Servers for years (since the NT 4 days) and I have run into my share of patching snafus. I have to say that MS had
made incredible strides in increasing patch reliability and documenting what each patch does. Most of the people these days that I see run into problems were either installing patches they didn't need, or did not properly examine their environment to see all
things the patches might touch. That said, managing a production web server can be difficult at times, but you have to be aware of what your apps/services are doing before you start altering the OS with updates. Btw, I have heard it remarked that the Stone
Age didn't end because we ran out of stones, but because we found a better way of doing things, and if you want to use CDONTS you can, as long as you don't have to authenticate or send against a remote SMTP server you should have no problems, the functionality
still exists (you can still write programs in BASIC as well but wth would you want to?).

Re: Setting up SMTP on IIS 7

Re: Setting up SMTP on IIS 7

Unfortuniately it seems that all the smtp configuration docuementation glosses over setting up the service using a drop file, and focuses on setting up an external service to IIS7.5

my problem is that I've gone thropugh the setup procedure pointing to a drop file directroy (and added the IIS_User permissions as you pointed out) but my asp web application ( a simple page with the "change password" control on it; spits out the following
error:

A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.

I've set the "from" address from the IIS manager to manager@onpoffice.froghaven.com in both the application directory, and at the website's root; restarted the site but still get this error. except for
this email problem it seems that the app is working

Re: Setting up SMTP on IIS 7

I ran into this problem also.. migrating from Win2k with IIS5 to Win2008 R2 with IIS 7.5.

I think it's really incredible being forced to use 2 different consoles for managing the website and the smtp server..... I have a java web application that needs to send e-mails to the outer world, and configuring just the SMTP e-mail on the IIS 7 console
doesn't make things work..... So I have to use the IIS 6 console....really frustrating....

Re: Setting up SMTP on IIS 7

Mate, why do absolute haters like you come on msft forums and spout your nonsense? Instead of answering his question (as if you could) and then possibly suggesting apache as an alternative you go into a temper tantrum espousing the evils of microsoft. Your
post comes off as nothing more than a childish rant. The answer you suggest at the end has NOTHING what so ever to do with IIS, and everything to do with smtp on "vista".Take your vitriol somewhere else please
mate.

Re: Setting up SMTP on IIS 7

Don't worry about people who rant about using this or that. Personally when people rant, and I do rant too, then be prepared to know other technologies. The last I knew, ZERO technology solutions were perfect. :))

Re: Setting up SMTP on IIS 7

I'm running through a asp.net 2.0 install and trying to get the password reset feature working on IIS7 on win2008 x64 box. I've done this many times on win2003 iis6 with the same asp.net application and a lot seems to have changed in IIS7 to get this working.

Installing SMTP feature in IIS7 was my first discovery. Needing the SMTP service running in IIS6 was a second surprise. I've done both but I have not been able to get the app to send the emails for password resets. the last error I got was "Unable to read
data from the transport connection: net_io_connectionclosed" but I got others along the way. In reviewing the above posts, ignoring the tempting pitch for a new career on apache, I see one step I might have missed and that's the "assignment of privs" on the
"drop directory".

What privs need to be set on the drop directory?

Second, is there a step by step how to on how to have an IIS7 environment setup so that ASP.NET applications can send email?

Considering the membership API's authentication mechanism is highly dependent on emailing reset password strings (unless you tweak the web.config), I would imagine its a common task right after you create the virtual directory/application in IIS.

Obviously I have to have this procedure dialed and nailed if its going to be deployed at a customer site.

Edit: I do have this all working now, but my mail settings in web.config are pointing to my external smtp server outside the lan with a live mail user/password in the config file. At customer deployments, ideally, I'd prefer to be able to specify localhost
(and "" for user/password) like I did in the IIS6 days rather than ask a customer to enter their smtp server and maintain a dummy user and password in the web.config).

Re: Setting up SMTP on IIS 7

I'm not a PHP guy, so if you are going to use the IIS SMTP, then try this simple test.http://support.microsoft.com/?id=297700
it applies to any IIS SMTP, so try that and see if the mail get send out or stuck in queue or badmail folder.
if it is not being sent, then smtp is not working - check event log and smtp log, it could be outgoing 25 port block, target server reject your mail etc

Now, per your php.ini you are using comcast smtp. So if the script doesn't send, then can you manually telnet the the host port 25, then perform manual steps to email, starting with HELO. only you make sure that there is no connection issue, you can manually
sent via telnet then go back to your script to debug.

Re: Setting up SMTP on IIS 7

This is quite possibly the stupidest thing I've seen from Microsoft. I've spent a good 12+ hours over the course of a few days trying to figure out why I can't find the full scope of SMTP settings in IIS7 so I can troubleshoot a SharePoint 2010 mail issue,
only to find out you have to open IIS6 manager to get to those settings.

Re: Setting up SMTP on IIS 7

It's stated in the Add Roles Wizard of WS2k8 during the Select Role Services, when IIS Management Console is selected. Under the description reads: "To manage SMTP, you must install and use the IIS 6 Management Console"

Re: Setting up SMTP on IIS 7

Hi all,
Not sure if this is the correct forum to post this, but this is the closest I could find.
We've had a Windows 2003 server with .Net Framework 2 and two sites running on it. Both used to send mails and worked fine.
Then due to some reason had to shift to a Windows Server 2008 R2 with IIS 7. The sites are up and running again. But the mails are not being sent. I hosted a test page in the site (with the same code in the actual page that fires the mail) which sends mail
and it too works fine most of the time.

I log the error that comes and it says "Mailbox unavailable. The server response was: must check for new mail first "
Where I'm lost is why it successfully send the mail at one time and fails the other? Any clues as to what I've done wrong is greatly appreciated.