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.

posted on Tuesday, July 11, 2006 2:24 PM by jatwood

Comments

# VSTS Links - 07/12/2006

Thomas Murphy on Team Data CTP4 Project System - Not Backward Compatible.

Josh Christie on Can I call...
Wednesday, July 12, 2006 6:02 AM by Team System News

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via Embedded CN13000 Motherboard at the Oz MEDC, the boards...
Sunday, August 06, 2006 8:22 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via Embedded CN13000 Motherboard at the Oz MEDC, the boards...
Sunday, August 06, 2006 9:30 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via Embedded CN13000 Motherboard at the Oz MEDC, the boards...
Sunday, August 06, 2006 9:34 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via Embedded CN13000 Motherboard at the Oz MEDC, the boards...
Sunday, August 06, 2006 9:38 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via Embedded CN13000 Motherboard at the Oz MEDC, the boards...
Sunday, August 06, 2006 10:10 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via EPIA Embedded CN13000 Motherboard at the Oz MEDC, the...
Sunday, August 06, 2006 10:16 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via EPIA&amp;nbsp;CN13000 Embedded Motherboard at the Oz MEDC,...
Sunday, August 06, 2006 10:16 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via EPIA&amp;nbsp;CN13000 Embedded Motherboard at the Oz MEDC,...
Sunday, August 06, 2006 10:29 PM by Dave Glover "Down Under (Oz)"

# Possibly the World's Smallest Team Foundation Server!!

Lol, well I couldn’t resist it, I scored a Via EPIA&amp;nbsp;CN13000 Embedded Motherboard at the Oz MEDC,...
Sunday, August 06, 2006 11:41 PM by Dave Glover "Down Under (Oz)"