legacy-knowledge-base
公開されました Jul. 2, 2025

メール設定のリセット方法

written-by

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • コントロール パネル > 設定 > サーバー管理 > メールで、以前に UI から設定および保存したメール設定をリセット (データベースから削除) するにはどうすればよいですか? (たとえば、ポータル プロパティまたは環境変数を介してそれらを提供する場合)

Environment

  • DXP 7.2

解決策

  • これらの設定は、portalpreferences データベース テーブルに保存されます。 使用
public static com.liferay.portal.kernel.model.PortalPreferences
deletePortalPreferences(long portalPreferencesId)

com.liferay.portal.kernel.service.PortalPreferencesLocalServiceUtil クラスの API メソッドで、portalpreferences DB テーブルの対応する行の portalPreferencesId を渡します。 この API メソッドを呼び出すための Groovy スクリプトの例:

import com.liferay.portal.kernel.service.PortalPreferencesLocalServiceUtil;

PortalPreferencesLocalServiceUtil.deletePortalPreferences(20131);

did-this-article-resolve-your-issue

legacy-knowledge-base