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.
1. start->administrative tools->server manager, go to features, select "add features", tick "smtp server" (if it is not already installed), choose to install the required "remote server admin toos"
2. check to confirm that "Simple Mail Transfer Protocol (SMTP)" service is running, if so, we are good to go.
3. start->administrative tools>internet info services(iis) 6.0
4. make sure that SMTP virtual server/default smtp server is running, if not, right click, then choose "start"
5. in IIS7, go to website/virtual directory, double click "SMTP E-mail", Click on "Deliver e-mail to SMTP server", check the "Use localhost" checkmark
--->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)
ciao
smtp iis 7.0 virtual server mailsettings c# 6.0 smtpclient
Marked as answer by robasta on Apr 21, 2009 04:04 PM
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.
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
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).
For ASP.NET setup see "Control Panel->System and Maintenance->Administrative Tools->IIS Manager->ASP.NET->SMTP Mail".
Note that if you want webmail thats another app again. Mailbee is OK, free for small volume use, and comes in ASP.NET.
3. start->administrative tools>internet info services(iis) 6.0
The guys from microsoft really wanna tell me that they developed a Windows 2008
Webserver Edition which has not the possibility to send out e-mails?
Is there any webapplication around in the world which is not sending out e-mails?
I have to use IIS7 and IIS6 at the same time? Or i have to use another third party application? Holy shit - i can not believe that!!!!!! What about performance and security?
(as far as i remember i just deinstalled all IIS6 settings to ad "FTP Publishing feature(lol)" to a IIS7 Website.) Damn!!
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.
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?).
robasta
18 Posts
Setting up SMTP on IIS 7
Apr 21, 2009 02:30 PM|LINK
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.
no help out there...
I am running win2k8 server and IIS 7.
please help.
smtp configuration under IIS 7.0 asp.net mail
robasta
18 Posts
Re: Setting up SMTP on IIS 7
Apr 21, 2009 04:03 PM|LINK
Okay, got it running. here's how:
1. start->administrative tools->server manager, go to features, select "add features", tick "smtp server" (if it is not already installed), choose to install the required "remote server admin toos"
2. check to confirm that "Simple Mail Transfer Protocol (SMTP)" service is running, if so, we are good to go.
3. start->administrative tools>internet info services(iis) 6.0
4. make sure that SMTP virtual server/default smtp server is running, if not, right click, then choose "start"
5. in IIS7, go to website/virtual directory, double click "SMTP E-mail", Click on "Deliver e-mail to SMTP server", check the "Use localhost" checkmark
6.Your code should be LIKE:
SmtpClient serv = new SmtpClient();
MailMessage msg = new MailMessage();
msg.To.Add("toadrr@domain.com);
msg.Body = "body";
msg.Subject = "subj";
msg.BodyEncoding = System.Text.Encoding.ASCII;
msg.IsBodyHtml = isHTML;
serv.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
serv.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["SmtpServerUserName"], ConfigurationManager.AppSettings["SmtpServerPassword"]);
serv.Send(msg);
--->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)
ciao
smtp iis 7.0 virtual server mailsettings c# 6.0 smtpclient
qbernard
5011 Posts
MVP
Moderator
Re: Setting up SMTP on IIS 7
Apr 21, 2009 04:25 PM|LINK
Bernard Cheah
ekerner
8 Posts
Re: Setting up SMTP on IIS 7
Jul 10, 2009 12:00 PM|LINK
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.
Anyway the answer to your mail problem (or rather MS's mail stuffup) is: http://weblogs.asp.net/steveschofield/archive/2006/12/19/iis7-post-23-vista-and-smtp-server-where-is-it.aspx
Best Regards,
Eugene Kerner.
mail on vista smtp on vista
qbernard
5011 Posts
MVP
Moderator
Re: Setting up SMTP on IIS 7
Jul 21, 2009 12:24 PM|LINK
Bravo! mate :)
Bernard Cheah
hitechinc
1 Post
Re: Setting up SMTP on IIS 7
Sep 16, 2009 02:16 PM|LINK
IIS 7 SMTP Vista Home Premium
ekerner
8 Posts
Re: Setting up SMTP on IIS 7
Sep 23, 2009 04:29 AM|LINK
Hi,
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).
For ASP.NET setup see "Control Panel->System and Maintenance->Administrative Tools->IIS Manager->ASP.NET->SMTP Mail".
Note that if you want webmail thats another app again. Mailbee is OK, free for small volume use, and comes in ASP.NET.
All the best,
Eugene.
mail on vista smtp on vista
Mueller09
1 Post
Re: Setting up SMTP on IIS 7
Oct 24, 2009 04:30 PM|LINK
The guys from microsoft really wanna tell me that they developed a Windows 2008 Webserver Edition which has not the possibility to send out e-mails?
Is there any webapplication around in the world which is not sending out e-mails?
I have to use IIS7 and IIS6 at the same time? Or i have to use another third party application? Holy shit - i can not believe that!!!!!! What about performance and security?
(as far as i remember i just deinstalled all IIS6 settings to ad "FTP Publishing feature(lol)" to a IIS7 Website.) Damn!!
IIS7 SMTP IIS6
steve schofi...
5681 Posts
MVP
Moderator
Re: Setting up SMTP on IIS 7
Oct 25, 2009 03:15 AM|LINK
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.
Steve Schofield
Windows Server MVP - IIS
http://iislogs.com/steveschofield
http://www.IISLogs.com
Log archival solution
Install, Configure, Forget
MaxASPSteve
62 Posts
Re: Setting up SMTP on IIS 7
Feb 18, 2010 05:00 AM|LINK
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?).