简体   繁体   English

WSO2 5.3.0电子邮件模板未更新

[英]WSO2 5.3.0 Email template is not updating

I am using WSO2IS 5.3.0 version. 我正在使用WSO2IS 5.3.0版本。 I updated all the configs but mistakenly i gave wrong password reset url in [IS_HOME]/repository/conf/email/email-admin-config.xml file. 我更新了所有配置,但错误地在[IS_HOME] /repository/conf/email/email-admin-config.xml文件中输入了错误的密码重置URL。 I started my server with RDBMS as datasource. 我以RDBMS作为数据源启动了服务器。 Everything worked well. 一切正常。

Then I noticed my password reset url is wrong. 然后我发现我的密码重置网址错误。 Again I went to [IS_HOME]/repository/conf/email/email-admin-config.xml file and updated the url and restarted WSO2. 我再次进入[IS_HOME] /repository/conf/email/email-admin-config.xml文件,更新了URL,然后重新启动了WSO2。 But it is not working for all the users. 但这并不适用于所有用户。 Some users still getting old template with wrong url. 一些用户仍然使用错误的网址获取旧模板。 I restarted my WSO2 multiple times and updated the xml file but no luck. 我多次重新启动了WSO2,并更新了xml文件,但是没有运气。 I even tried to change the template through carbon admin UI but still it is sending wrong template. 我什至尝试通过carbon admin UI更改模板,但仍然发送错误的模板。

The weird thing is it is sending right one immediately after i restart WSO2 but after sometimes it start using old template. 奇怪的是它在我重新启动WSO2之后立即发送正确的消息,但有时它开始使用旧模板。 How can I solve this issue without reconfigure everything from beginning? 我如何解决此问题而无需从头开始重新配置所有内容?

Let's me explain how the email-admin-config.xml works. 让我解释一下email-admin-config.xml的工作方式。 This file works as the bootstrap data required to populate email templates in WSO2 Identity Server. 该文件用作在WSO2 Identity Server中填充电子邮件模板所需的引导程序数据。 So whenever you create a tenant initial data related to email templates will be read from here. 因此,每当您创建一个租户时,都会从此处读取与电子邮件模板相关的初始数据。

So we basically read the file during the first startup (ie. creation of carbon.super tenant) and any new tenant creation of the server and write the content to the database. 因此,我们基本上在第一次启动 (即创建carbon.super租户)和服务器的任何新租户期间读取文件,并将内容写入数据库。 Thereafter any change you want to do needs to be done with the UI provided in the Managment Console. 此后,您需要使用管理控制台中提供的用户界面来完成您要进行的任何更改。

Restarting the server won't make the changes apply to existing tenants that were created before changes were made to email-admin-config.xml. 重新启动服务器不会使更改适用于在对email-admin-config.xml进行更改之前创建的现有租户。 But if you create a new tenant the updated content will be read from the email-admin-config.xml. 但是,如果您创建一个新的租户,则将从email-admin-config.xml中读取更新的内容。

Hope this clarifies your concerns. 希望这可以澄清您的担忧。

Adding to @farasath's answer. 添加到@farasath的答案。 You can also use a SOAP service to change the template programmatically. 您还可以使用SOAP服务以编程方式更改模板。 For that, you can use AccountCredentialMgtConfigService . 为此,您可以使用AccountCredentialMgtConfigService The service contract can be accessed from. 可以从访问服务合同。

https://<host>:<port>/services/AccountCredentialMgtConfigService?wsdl

However to access the WSDL, you have to set HideAdminServices property to false first at <IS_HOME>/repository/conf/carbon.xml and restart the server. 但是,要访问WSDL,必须先在<IS_HOME>/repository/conf/carbon.xml HideAdminServices属性设置为false ,然后重新启动服务器。

Also, in the management console, the email template management UI can be found under Manage section on the left side panel. 另外,在管理控制台中,电子邮件模板管理UI可以在左侧面板的“ Manage部分下找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM