Email Successful sent message but email is not sent us8ing TSWA for Bug
- Hi All,
I selected a bug and using tool, i selected Send Mail option.
There i gave to email address and then sent.
i got successful mail sent message. But when i checked my mail. The mail was not there.
What is teh problem?
Thanks,
Anurag
Anurag Verma
Answers
- Hi Anurag,
Is your TFS and SmtpHost in the same domain or machine? If so, could you verify that the smtphost received the mail?
TSWA has a function to send workitem as an email.
If TFS and smtphost are in the same domain(machine) and the TFSService account has enough permission to send email, it all right, just enable <emailSettings sendingEmailEnabled="true" enableSsl="false" /> is ok.
But if you want to use remote SMTP Server, set the value of<system.net> <mailSettings> <smtp deliveryMethod="Network" from="…"> <network defaultCredentials="false" host="SmtpHost" port="25" password="***" userName="name"/> </smtp> </mailSettings>
does not work.
As I use reflector to open EmailSettingsElement in Microsoft.TeamFoundation.WebAccess.Common.dll, I found that it use the property-value pair in <emailSettings>
public class EmailSettingsElement : ConfigurationElement { [ConfigurationProperty("enableSsl", DefaultValue=false, IsRequired=false)] public bool EnableSsl { get; } [ConfigurationProperty("fromEmail", DefaultValue="", IsRequired=false)] public string FromEmail { get; } [ConfigurationProperty("sendingEmailEnabled", DefaultValue=false, IsRequired=true)] public bool SendingEmailEnabled { get; } public string SmtpFrom { get; } [ConfigurationProperty("smtpHost", DefaultValue="", IsRequired=false)] public string SmtpHost { get; } [ConfigurationProperty("smtpPassword", DefaultValue="", IsRequired=false)] public string SmtpPassword { get; } [ConfigurationProperty("smtpUsername", DefaultValue="", IsRequired=false)] public string SmtpUsername { get; } }
So we can set the property-value pair in <emailSettings> to use remote smtp server like
<emailSettings sendingEmailEnabled="true" enableSsl="false" fromEmail="…" smtpHost="SmtpHost" smtpPassword="***" smtpUsername="name"/>
Notice that “Port” is not specified in <emailSettings>, you can set it in<system.net>.<mailSettings>.
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorMonday, November 02, 2009 5:02 AM
- Hi ruiz,
This issues was fixed. SMTP server was blocking the server ip. After unblocking it by the network admin and the restarting teh tfs server. It started working.
Thanks,
Anurag
Anurag Verma- Marked As Answer byAnuragMindrani Monday, November 30, 2009 8:07 AM
All Replies
Hi Anurag,
Can you verify that under C:\Program Files\Microsoft Visual Studio 2008 Team System Web Access\Web\web.config, the Email Settings(SMTP Server,from email ID) are proper.
- Hi Anurag,
Is your TFS and SmtpHost in the same domain or machine? If so, could you verify that the smtphost received the mail?
TSWA has a function to send workitem as an email.
If TFS and smtphost are in the same domain(machine) and the TFSService account has enough permission to send email, it all right, just enable <emailSettings sendingEmailEnabled="true" enableSsl="false" /> is ok.
But if you want to use remote SMTP Server, set the value of<system.net> <mailSettings> <smtp deliveryMethod="Network" from="…"> <network defaultCredentials="false" host="SmtpHost" port="25" password="***" userName="name"/> </smtp> </mailSettings>
does not work.
As I use reflector to open EmailSettingsElement in Microsoft.TeamFoundation.WebAccess.Common.dll, I found that it use the property-value pair in <emailSettings>
public class EmailSettingsElement : ConfigurationElement { [ConfigurationProperty("enableSsl", DefaultValue=false, IsRequired=false)] public bool EnableSsl { get; } [ConfigurationProperty("fromEmail", DefaultValue="", IsRequired=false)] public string FromEmail { get; } [ConfigurationProperty("sendingEmailEnabled", DefaultValue=false, IsRequired=true)] public bool SendingEmailEnabled { get; } public string SmtpFrom { get; } [ConfigurationProperty("smtpHost", DefaultValue="", IsRequired=false)] public string SmtpHost { get; } [ConfigurationProperty("smtpPassword", DefaultValue="", IsRequired=false)] public string SmtpPassword { get; } [ConfigurationProperty("smtpUsername", DefaultValue="", IsRequired=false)] public string SmtpUsername { get; } }
So we can set the property-value pair in <emailSettings> to use remote smtp server like
<emailSettings sendingEmailEnabled="true" enableSsl="false" fromEmail="…" smtpHost="SmtpHost" smtpPassword="***" smtpUsername="name"/>
Notice that “Port” is not specified in <emailSettings>, you can set it in<system.net>.<mailSettings>.
Best Regards,
Ruiz
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorMonday, November 02, 2009 5:02 AM
- Hi ruiz,
This issues was fixed. SMTP server was blocking the server ip. After unblocking it by the network admin and the restarting teh tfs server. It started working.
Thanks,
Anurag
Anurag Verma- Marked As Answer byAnuragMindrani Monday, November 30, 2009 8:07 AM


