Team Foundation Server不可读的电子邮件格式 [英] Team Foundation Server unreadable email format

查看:116
本文介绍了Team Foundation Server不可读的电子邮件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为TFS通知设置了构建中断的时间,它可以正常工作,但是电子邮件格式不正确,并且充满了亚洲字符:

我假设是由某个区域设置引起的?

我无权访问SMTP服务器,但其他任何人都不太可能遇到格式错误的邮件.有谁知道这是什么原因以及如何解决?

解决方案

我记录了我的第一个Microsoft案例,带回回忆.

解决方案1 ​​

MSFT工程师发现了类似的情况:

TFS通知和警报采用UTF 16编码,并且显示乱码.

解决方案是从交换服务器上的电子邮件中删除隐私标签.

或者使用第三方smtp服务器.

我无法在工作受限的环境中尝试其中任何一种,但我认为分享会在将来对其他人有所帮助.

解决方案2

我在MSDN上找到了类似的线程<?xsl:import href ="TeamFoundation.xsl"/><?xsl:output method =" xml " doctype-public =-//W3C//DTD HTML 4.01//EN"/>
<?xsl:output encoding ="utf-8" indent ="yes" method =" xml "/>

  1. 在TeamFoundation.xsl中,将html切换为xml:

< xsl:stylesheet version ="1.0" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"> < xsl:output method =" xml "/>

  1. 执行IISReset或重新启动TFS服务器以使更改生效很重要.

I've setup TFS notifications for when a Build Breaks and it works but the email is malformed and full of Asian characters:

I'm assuming there is a locale setting causing it?

I don't have access to the SMTP server but its unlikely anyone else is encountering malformed messages. Does anyone know what causes this and how to fix it?

解决方案

I logged my very first Microsoft case for this one, brings back memories.

Solution 1

The MSFT Engineer found a similar case:

TFS Notifications and alerts are UTF 16 encoded and they are garbled.

The solution is to remove the privacy tag from the emails on the exchange server.

Alternatively use a 3rd party smtp server.

I cannot attempt either of these in the locked down environment I work in but I thought share if it helps someone else in the future.

Solution 2

I found a similar thread on MSDN TFS 2012 sends Chinese characters in emails, breaking HTML alerts for all users.

The (TFS2012) solution is to edit the TeamFoundation.xsl file(s). This solution works for TFS2017, except you need to edit the BuildCompleteEvent.xsl and TeamFoundation.xsl files in the directory:

%ProgramFiles%\Microsoft Team Foundation Server 15.0\Application Tier\TFSJobAgent\Transforms\1033

  1. In the BuildCompleteEvent.xsl switch html to xml in 2 places:

<?xml version='1.0'?> <?xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:tb="http://schemas.microsoft.com/TeamFoundation/2010/Build" xmlns:ms="urn:schemas-microsoft-com:xslt"> <?xsl:import href="TeamFoundation.xsl"/> <?xsl:output method = "xml" doctype-public ="-//W3C//DTD HTML 4.01//EN"/>
<?xsl:output encoding="utf-8" indent="yes" method="xml"/>

  1. In the TeamFoundation.xsl switch html to xml:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/>

  1. It is important you do a IISReset or a Reboot the TFS server for the changes to take affect.

这篇关于Team Foundation Server不可读的电子邮件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆