about project alert
I add a project alert to my present project, when the dailybuild of the project finished, I hope to receive a E-mail to me, so I add my E-mail address to the project alert box, but I received no E-mail about this operation, why? what other things I need to do? expect your help! Thanks!
Can you provide more information about your setup?
How did you subscribe to the alert?
Which of the 4 alerts did you subscribe to?
Did you provide the information for alerts to be sent when installing TFS?
You can subscribe to alerts using Visual Studio. Select a Team Project from the Team Explorer, right click, then choose alerts. Provide an email address for the alerts that you are interested in. The 4 alerts are: build completed, build status changed, work item changed, checkin occurred.
The web.config file in the installDirectory\Web Services\Services folder contains information needed to send the alert. smtpHost contains the SMTP relay host to which the alert will be sent. emailNotificationFromAddress contains the value that will become the "From" address of the email. Note that some SMTP relay hosts require the "From" address to match the email address associated w/the account under which the TFS Application pool runs.
Thanks your reply! but my question haven't resolved.
In the Team Explorer, I select a project, right click it , then choose the "project alert" menu, in the project alert diologue, I subscribe only one alert: build completed, and input my E-mail address shinezyj@163.com, I wish to receive an E-mail notification when the dailybuild finished.
According to your instruction, I found the web.config file in my installDirectory D:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services and modify it as follows:
<add key="emailNotificationFromAddress" value="zhuyj@extech.com.cn" />
<add key="smtpServer" value="smtp.extech.com.cn" />
but when the build finished, I received no E-mail notification , why?
what other things I should to do?
need your further help!
in TFS Application pool attribute of the IIS manager , the configure user is UBSDOMAIN\TFSService, in the activeDirectory, the E-mail address associated with the user UBSDOMAIN\TFSService is zhuyj@extech.com.cn, in web.config file , I modify it as follows:
<add key="emailNotificationFromAddress"
value="zhuyj@extech.com.cn" />
<add key="smtpServer" value="UBSCMSERVER" />
in the project alert of the TeamExplorer, I set the E-mail address jiangf@extech.com.cn
but when the build finished, I received no E-mail notification.
I change the smtpServer to smtp.extech.com.cn, which is the mailserver of my company, like this:
<add key="emailNotificationFromAddress"
value="zhuyj@extech.com.cn" />
<add key="smtpServer" value="smtp.extech.com.cn" />
these two methods both failed. why? how can I do? Thanks!
Let's verify if sending email to this account is working -- try the simple program mentioned at this blog post first.
-jeff
according to the blog, I changed the string value like this:
using System;
using System.Net;
using System.Net.Mail;
namespace MailSender
{
class Sender
{
public static void Main(string[] args)
{
try
{
string Host = "smtp.extech.com.cn";
string FromAddress = "zhuyj@extech.com.cn";
string ToAddress = "jiangf@extech.com.cn";
SmtpClient client = new SmtpClient(Host);
MailMessage mm = new MailMessage(FromAddress, ToAddress);
mm.Body="TestBody";
mm.Subject="TestSubject";
client.UseDefaultCredentials = true;
mm.BodyEncoding = System.Text.Encoding.UTF8;
client.Send(mm);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Console.ReadLine();
}
}
}
After running it, an error message printed out ,as follows:
System.Net.Mail.SmtpException: 不允许使用邮箱名称。 服务器响应为: <zhuyj@extech.com.cn>: Sender address rejected: not logged in
在 System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
在 System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)
在 System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
在 System.Net.Mail.SmtpClient.Send(MailMessage message)
在 MailSender.Sender.Main(String[] args) 位置 D:\Documents and Settings\TFSService\My Documents\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\Program.cs:行号 28
<zhuyj@extech.com.cn>: Sender address rejected: not logged in
I think It is because my company's mailserver needs identity validation, I must input password, then I can send and receive E-mail. where can I input
the password? or I need do other things?
need your further help! Thanks a lot!