如何设置从 project.properties 个文件发送电子邮件

How to set to email from project.properties files

我需要为我的应用程序触发两封电子邮件,一封发送给登录用户,一封发送给客户服务。 对于客户服务,我在 project.properties 中设置电子邮件 ID,然后点击事件 class:

deleteAccountSupportEvent.setAgentEmail(代理邮箱地址);

agentEmailAddress 正在从 project.properties 中选取电子邮件 ID: final String agentEmailAddress = getConfigurationService().getConfiguration().getString(DELETE_REQUEST_EMAIL_TO_AGENT);

我也在 Context class 中设置了电子邮件: setAgentEmail(((PHDeleteAccountEmailProcessModel) processModel).getAgentEmail());

但不是所有这些,邮件被触发到登录用户。 请帮忙。

您可以保持简单,如下所示:

final String agentEmailAddress = getConfigurationService().getConfiguration().getString(DELETE_REQUEST_EMAIL_TO_AGENT);

setAgentEmail(agentEmailAddress);

据我所知上下文用于邮件正文动态内容。电子邮件地址的添加位置可能存在逻辑。