Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Version: Windchill 12.1
Use Case: Differentiate between mail notifications coming from each environment so that users don't get confused
Description:
Emails sent by Windchill are not very reliable in terms of, from which environments are coming. Sometimes I see the email of the test server server-test@company.com, sometimes I just receive an email where the FROM(on the email) matches the user's email (the user to whom the email is sent).
How can I reliably differentiate all emails coming from the test from the ones coming from the production, since the username does not change, but the URL of the environment changes from env to env, it would be convenient to trace that information somewhere and not rely on the user email.
Thanks in advance,
Solved! Go to Solution.
Maybe someone has a better solution than this.
I update the "EmailSubject" to include the server name via JConsole (e.g. "[server name] Deadlocked threads detected"). It is tedious to initially configure, but it works.
If Windchill is running as Windows Services: windchill wt.util.jmx.SMJconsole
Go through all the Notification Handlers at the site level
MBeans (tab) > com.ptc > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
Also go through each Method Server and Background Method Server.
MBeans (tab) > com.ptc > MethodServers > BackgroundMethodServer.{PID} > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
MBeans (tab) > com.ptc > MethodServers > MethodServer.{PID} > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
Then save the changes.
MBeans (tab) > com.ptc > Loader > Operations > Save (button)
Changes are written to %wt_home%\codebase\WEB-INF\serverManagerMBeanConfig.xml and methodServerMBeanConfig.xml.
You can copy these files to the other systems and update the value of "[server name]" to communicate the server's name.
If you don't want to spend all that time in JConsole, you can search these files for "<void property="emailSubject">" and just update the values to insert the server name.
Maybe someone has a better solution than this.
I update the "EmailSubject" to include the server name via JConsole (e.g. "[server name] Deadlocked threads detected"). It is tedious to initially configure, but it works.
If Windchill is running as Windows Services: windchill wt.util.jmx.SMJconsole
Go through all the Notification Handlers at the site level
MBeans (tab) > com.ptc > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
Also go through each Method Server and Background Method Server.
MBeans (tab) > com.ptc > MethodServers > BackgroundMethodServer.{PID} > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
MBeans (tab) > com.ptc > MethodServers > MethodServer.{PID} > Monitors > NotificationHandlers > {handler} > Attributes > EmailSubject (value)
Then save the changes.
MBeans (tab) > com.ptc > Loader > Operations > Save (button)
Changes are written to %wt_home%\codebase\WEB-INF\serverManagerMBeanConfig.xml and methodServerMBeanConfig.xml.
You can copy these files to the other systems and update the value of "[server name]" to communicate the server's name.
If you don't want to spend all that time in JConsole, you can search these files for "<void property="emailSubject">" and just update the values to insert the server name.
Hello @tarik_p,
You have a response from a community member. Did you get a chance to review the suggestions provided in it?
If it helped you solve your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.
