Configuring SMTP E-mail in IIS 7

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

In order to send e-mail from an ASP.NET application using the System.Net.Mail API, you must configure SMTP e-mail. Configuring e-mail services tells the System.Net.Mail API to which SMTP server the e-mail generated by your application should be delivered. You can also configure your application to deliver e-mail to a file location on disk where it can be retrieved for delivery later.

Prerequisites

For information about the levels at which you can perform these procedures, and the modules, handlers, and permissions that are required for these procedures, see SMTP E-mail Feature Requirements (IIS 7).

Procedures

This task includes the following procedures:

Configure SMTP E-mail (IIS 7)

Tags : fooled


Community Content

cyberuser
configuring SMTP
i am including an module in my website that sends automated email to a list of members but i am&nbsp; facing a problem with my webconfig file while configuring iis 7<br />
Tags :

Thomas Lee
I was fooled too.
<p>Thanks for leaving the details of adding the "Feature"</p>
Tags :

Thomas Lee
How to read CONFIGURATION information in Dot Net?
I understand IIS7 does not have an SMTP server installed. <div><br /></div><div>I want to know how I use System.Net.Mail classes to send mail using the configuration information set up in IIS7 mmc.</div><div><br /></div><div>Again: I understand these settings are not configuring an actual SMTP server - they configure the location/identification of an SMTP server. This is what I want: My application is distributed to users who I'd rather NOT have in the web.config file.</div><div><br /></div><div>What I don't KNOW is how to use these settings in my code. Right now I have to use web.config or hard code the values in my code.<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br /></div>
Tags :

Thomas Lee
Somehow mesleading!
Yes, it should describe how an application can use it to send/receive email.<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br />
Tags :

Thomas Lee
How to install SMTP Server...
<p>SMTP Server is not a role, it's a "<u><b><i>feature</i></b></u>". <br /><br /> To add SMTP Server:<br /><br /> 1. Start the Server Manager MMC.<br /> 2. Under "Roles" you'll see "Features". <br /> 3. In the top right corner you'll see "Add Features".<br /> 4. In the pop up box you'll find "SMTP Server".<br /><br /> You may need install other features necessary for SMTP Server to run (like .Net or IIS).<br /> Everything you need will install from this point.</p>

Thomas Lee
i too wasted my time on this
I did the above settings and thght m through the email n msging things but then realized only this not gonna help me in my application, for receiving or sending mails.<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br />
Tags :

Thomas Lee
How to configure SMTP server in IIS 7.0?
<p>Hello!;</p> <p>Good days;</p> <p>How to configure SMTP server in IIS 7.0 ??? I tried but message appears:</p> <p>Failure sending mail.<br /></p> <p>Please explain with images.</p> <p>best regards;</p> <p>Mohammed Al shrieef</p> <p> <br /> </p> <p> <b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b> <mtps:InstrumentedLink NavigateUrl="mailto:mohamedid66@yahoo.com" runat="server" xmlns:mtps="http://msdn2.microsoft.com/mtps" /> </p> <p />
Tags :

Thomas Lee
These topics are a bit misleading
Maybe I'm wrong this topic is misleading. It gives the impression - that setting this up in IIS7 Management actually configures <b>SMTP service</b> - which isn't the case.<br /><br />I wasted about an hour because of this. I was thinking, what? Where did relay restrictions go? Where did access restrictions go? The settings in this topic make it seem that this is "all you have to do"....<br /><br />This article should clarify that you are only referring to how an application can be configured to send email and is **not** how to enable/configure the actual SMTP virtual server itself (on win2008 server)<br /><br />SMTP server itself is still configured by IIS 6.0 "snap in". That's where the local SMTP virtual server service is started/stopped, configured for relay, etc. etc.<br /><br />he IIS7 mmc just configures applications to use "some SMTP server" to send email. It even just reflects what you have configued in web.config for web sites. If you want to use "localhost", you must still configure the SMTP server <b>separately</b>. It does not enable/start/stop/configure relay of the SMTP server on Windows 2008.....<br /><br />Can we start a tutorial on configuring relay properties? <div><br /></div><div>Install IIS 6.0 Manager</div><div>Configure your virtual SMTP Server</div><div>Then Create a dot net app that uses System.Net.Mail</div><div>And finally in IIS 7 specify the host as local host and credentials accordingly<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br /></div>
Tags :

Thomas Lee
I'm confused about the SMTP server and SMTP E-mail feature
Hi, there is a question in 70-643 exam, <br /> You work as the IT professional in an international company which is named Wiikigo. You are<br /> experienced in implementing and administering a network operating system. You are specialized in<br /> deploying servers, configuring Windows Server 2008 Terminal services and network application services,<br /> and configuring a web services infrastructure. You have a server named S01 that runs Windows Server<br /> 2008. The server has the Web Server (IIS) server role installed. You have an SMTP gateway that connects<br /> to the Internet. The internal firewall prevents all computers, except the SMTP gateway, from establishing<br /> connections over TCP port 25. You have the SMTP gateway configured to relay e-mail for S01. You have to<br /> configure a Web site on S01 to send e-mail to Internet users. What action should you perform?<br /> A. An MX record for S01 should be created on an internal DNS server.<br /> B. An MX record for the SMTP gateway should be created on an internal DNS server.<br /> Testinside<br /> TestInside Help You Pass Any IT Exam http://www.TestInside.com<br /> C. The SMTP Server feature should be installed on S01.<br /> D. The SMTP E-mail feature for the Web site should be installed on S01.<br /> the correct Answer they given is D<br /><br /> what's the different to the answer C and D? I cant find a option to install the SMTP E-mail feature to a website. Hope somebody can help me, thanks.<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br />
Tags :

Thomas Lee
aspnet app with windows server 2008 dont send email
Hi, im trying to fix this problem and im still having this issue.<br /><br /> I have an application and all work perfect in windows vista home with iis7, test server with windows server 2003. but when im install the web application on the production server with windows server 2008 r2, simple always get the message: failure sending mail.<br /><br /> reading other post, i add the smtp feature to my win 2008 server, and trying to configure the iis email properties, and nothing happend. same error always.<br /><br /> my server dont have antivirus and windows firewall is off.<br /><br /> with iis7 configuration email properties i try with both options: deliver email to smtp server: checking and uncheking localhost.<br /><br /> this iis smtp configuration where needs be ? at server lvl, default web site level or application level.i try in all ways. Now i have all this 3 configurations, what of this can i leave ?<br /><br /> how can i fix this problem ???? step by step ????<br /><br /> if you need screenshot of my server configuration, tellme how to sendit.<br /><br /> Thx<br /><br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br />
Tags :

Thomas Lee
web.config entry for system.net.mail to work on IIS 7
I experienced the same issues like lots of others reported here in the forum. Finally I got my application to work when I added following lines in the web.config<br />&lt;system.net&gt;<br /> &lt;mailSettings&gt;<br /> &lt;smtp deliveryMethod="Network" from="something@mydomain.com"&gt;<br /> &lt;network defaultCredentials="true" host="smtp.mydomain.com" /&gt;<br /> &lt;specifiedPickupDirectory pickupDirectoryLocation="C:\Inetpub\mailroot\Net-SMTP-Email" /&gt;<br /> &lt;/smtp&gt;<br /> &lt;/mailSettings&gt;<br /> &lt;/system.net&gt;<br /><br /> This has the same affect as when you open the IIS Management console on IIS 7 / select your web site / select the SMTP E-mail feature tab<br /><br /><b>[tfl - 29 01 12] Hi - and thanks for your post. Community content is not the appropriate place for technical support queries. Instead, <br /> you should visit the Technet Forums at http://forums.microsoft.com/technet, where such posts are welcomed and where you stand a much <br /> better chance of getting your query resolved. Sorry if that's not the answer you wanted to hear.</b><br />
Tags :

Page view tracker