【发布时间】:2015-10-12 09:00:57
【问题描述】:
我们正在使用 Day CQ 邮件服务配置来发送邮件。我在我的服务实现中使用以下代码引用了配置。
@Reference
private MessageGatewayService messageGatewayService;
@Reference
private MessageGateway<HtmlEmail> messageGateway;
我们通过配置节点提供配置值。代码构建后,我们可以在 Day CQ Mail Service Felix 配置中看到 SMTP 服务器值。问题是当我提交表单以发送邮件时,它会引发 MailingException 记录“无效的邮件服务配置”。即使配置值都是正确的,它仍然会抛出相同的异常。
为解决此问题,我们转到相应的捆绑包“Day Communique 5 Mailercom.day.cq.cq-mailer”并重新启动捆绑包。然后配置开始工作,我们能够发送电子邮件。
为什么我必须明确地重新启动 CQ OOTB Bundle 才能使配置工作?
【问题讨论】: