How to set SMTP Port in TFS2010
In TFS2010 Administration Console, you can only set SMTP Server and Email From Address.
And in the TFS Config command line
TFSConfig ConfigureMail /FromEmailAddress:emailAddress /SmtpHost:SMTPHostName
You can not set port. Smtphost:port is not a valid format even though the command could accept it successfully.
In TFS2010, TFSJobAgent is used to send notification. You can edit the TFSJobAgent.exe.config to set the mail port.
Add following script to C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent\TfsJobAgent.exe.config
`
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.net>
<mailSettings>
<smtp >
<network host="smtpserver" port="26" >
</smtp>
</mailSettings>
</system.net></configuration>
The host will be ignored but port will be used.