一、SMTP允许匿名连接,同时匿名连接的用户可以使用任何邮件地址发送邮件
在wt.properties中设置SP服务器的地址/主机名和端口号:
wt.mail.mailhost=smtp.163.com:25(根据自己的实际邮箱信息配置)
在WindchillShell中执行:
xconfmanager -s wt.mail.mailhost= smtp.163.com:25 -t codebase\wt.properties –p
二、SMTP不允许匿名连接,连接的用户可以使用任何邮件地址发送邮件
这种情况下Windchill需要在mail.properties文件中配置连接SMTP服务器的用户名和密码,一旦用户名和密码通过SMTP服务器验证,Windchill就可以使用任何用户的邮件地址发送邮件
在wt.properties中指定mail.properties文件的路径,然后在mail.properties文件中保存用户名和密码,一般mail.properties存放在用户无法通过网页匿名访问的路径,默认存放在Windchill安装目录下
mail.properties内容:
wt.mail.smtp.username=username
wt.mail.smtp.password=password
在WindchillShell中执行(直接添加到wt.properties中):
- xconfmanager -s wt.mail.smtp.username=xxx@xxx.com -t codebase\wt.properties –p
- xconfmanager -s wt.mail.smtp.password=xxx -t codebase\wt.properties –p
三、SMTP服务器不允许匿名连接,只能使用Windchill指定的邮件发件人发送邮件
这种情况在前两种基础上,需要修改Sendmail.xml文件,指定邮件发送人
1.找到Windchill_x.x\Windchill\tasks\wt\mail\Sendmail.xml文件
将文件中f<ie:param name=“FROM” data="${@FORM[0]FROM[0]}" default="<%=DEFAULT_FROM%>"/>修改为:
<ie:param name="FROM" data="xxx@xxx.com" default="<%=DEFAULT_FROM%>"/>
2.在wt.properties文件中添加: wt.mail.from=username
<font color=red>- xconfmanager -s wt.mail.from=xxx@xxx.com -t codebase\wt.properties –p</font>
注意:此处设置完成后影响工作流任务的发送者以及一面发送的发送者,设置为那个用户为发送方这,则该用户即为发送者
在site.xconf中添加,然后在WindchillShell中执行xconfManager -p即可.
<Property name="wt.mail.mailhost" overridable="true" targetFile="codebase/wt.properties"
value="smtp.qiye.163.com"/>
<Property name="wt.mail.from" overridable="true" targetFile="codebase/wt.properties"
value="xxx@xxx.com"/>
<Property name="wt.mail.smtp.username" overridable="true"
targetFile="codebase/wt.properties"
value="xxx@xxx.com"/>
<Property name="wt.mail.smtp.password" overridable="true"
targetFile="codebase/wt.properties"
value="xxx"/>