Changing SMTP settings on Team Foundation Server
During the Team Foundation Server install, you can specify a SMTP server address to enable email notifications from the server.
However, if you forget to do this, or if you enter the wrong SMTP server information, you can change the Team Foundation Server email settings without reinstalling Team Foundation Server. Just edit the web.config file at this path:
C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services
Modify the emailNotificationFromAddress and smtpServer keys, below, to set up email through a new SMTP server:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectionString" value="Application Name=TeamFoundation;Persist Security Info=False;Initial Catalog=TfsIntegration;Data Source=TeamSystemSqlTier;Integrated Security=SSPI"/>
<add key="eventingEnabled" value="true" />
<add key="DetailedExceptions" value="false" />
<add key="emailNotificationFromAddress" value="teamsystem@yourdomain.com" />
<add key="smtpServer" value="mail.yourdomain.com" />
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin\Plugins;bin\Plugins\zh-chs;bin\Plugins\zh-cht;bin\Plugins\de;bin\Plugins\es;bin\Plugins\fr;bin\Plugins\it;bin\Plugins\ja;bin\Plugins\ko"/>
</assemblyBinding>
</runtime>
<system.web>
<!-- Enable the HttpHandlers for file upload and download -->
<httpHandlers>
<add verb="*" path="methodology.asmx" type="Microsoft.TeamFoundation.Client.MethodologyDownloadHandler" />
<add verb="*" path="methodologyUpload.asmx" type="Microsoft.TeamFoundation.Client.MethodologyUploadHandler" />
</httpHandlers>
</system.web>
</configuration>
We're using our Exchange SMTP provider, so I don't need a SMTP service installed locally on the Team Foundation Server.
Editing web.config forces an automatic restart of the web service, so no need to cycle IIS or anything like that after doing the edit. You might think twice about doing this on a production server in the middle of the day, though.