How to set SMTP server in Team Foundation 2008
Hi, I had to change the SMTP server that I am using in my
Team Foundation Server 2008.
Unfortunately, as in other cases with TFS, changing
configurations is not a straight forward task, not also a
friendly one L.
You have to get through tables in the DBs or .configs. In
the case you want to change SMTP server the configurations
are on the following .configs files:
-
SMTP Configuration in TFS Server
o
C:\Program Files\Microsoft Visual Studio 2008 Team
Foundation Server\Web Services\Services\Web.config
-
1:
<appSettings>
-
2: <add
key="ConnectionString"
value="Application Name=TeamFoundation;Persist Security
Info=False;Initial Catalog=TfsIntegration;Data
Source=TFS2008;Integrated Security=SSPI"/>
-
3: <add
key="eventingEnabled"
value="true"
/>
-
4: <add
key="DetailedExceptions"
value="false"
/>
-
5: <add
key="emailNotificationFromAddress"
value="tfs2008@mydomain.com"
/>
-
6: <add key="smtpServer" value="mySmtpServer"
/>
-
7:
-
8: <!-- Optional Alert Settings
-
9:
AlertUseReplyTo: True, False
(default: True). Specifies that the ReplyTo property of
the
-
10:
email alert
should be set. When false, the From property is set.
-
11:
<add key="AlertUseReplyTo"
value="True" />
-
12:
-->
-
13:
</appSettings>
-
SMTP Configuration in TFS Web Access
o
C:\Program Files\Microsoft Visual Studio 2008 Team System
Web Access\Web\web.config
- 1: <webAccessSettings>
- 2:
- 3: <!-- Some settings removed for brevity. -->
- 4:
- 5: <!--
- 6: Specifies whether sending query results and work items as email is enabled.
- 7: Make sure to enable/disable mailSettings section in <system.net> below for the sender username and password
- 8: -->
- 9: <emailSettings sendingEmailEnabled="true" />
- 10:
- 11: </webAccessSettings>
- 12:
- 13: <!-- ** Email Settings ** -->
- 14: <system.net>
- 15: <mailSettings>
- 16: <smtp deliveryMethod="network" from="fromaddress@domain.com">
- 17:
- 18: <!-- Use default credentials -->
- 19: <!--<network host="mail.example.com" port="25" defaultCredentials="true" />-->
- 20:
- 21: <!-- To specify a username and password, comment out the <network> section
- 22: above, and uncomment the one below -->
- 23: <network host="smtpHost" port="25" defaultCredentials="false" userName="smtpUsername" password="smtpPassword" />
- 24:
- 25: </smtp>
- 26: </mailSettings>
- 27: </system.net>
I found a very useful post from David Barrett
here. I strongly recommend it for deeper details.
Hope the information is useful, thanks
PP