首页 > 解决方案 > ATG-通过实用程序 java 调度程序发送电子邮件的问题

问题描述

this.getSmtpEmailSender().sendEmailMessage(msg)在 ATG 中,当调用方法时,我得到了以下异常。但是相同的代码可以在不同的环境中正常工作。可能是配置问题。我需要检查什么。

/com/ncr/base/common/services/EmailService      

java.lang.Exception: The final format argument for a vlog call is a throwable, but is not referenced. The throwable will be logged, but please use an explicit Throwable argument before the format string to eliminate ambiguity.

**** Warning    Fri Dec 21 02:49:02 -05:00 2018 1545378542129   /com/ncr/base/common/services/EmailService              at atg.nucleus.logging.VariableArgumentApplicationLoggingUtil.getUnreferencedThrowable(VariableArgumentApplicationLoggingUtil.java:744)
**** Warning    Fri Dec 21 02:49:02 -05:00 2018 1545378542129   /com/ncr/base/common/services/EmailService              at atg.nucleus.logging.VariableArgumentApplicationLoggingUtil.vlogError(VariableArgumentApplicationLoggingUtil.java:344)

/com/ncr/base/common/services/EmailService 嵌套异常是:com.sun.mail.smtp.SMTPSenderFailedException: 501 5.1.7 Invalid address

标签: javasmtpatg

解决方案


To我的猜测是您的其中一个电子邮件地址在orFrom字段中均无效。

ATG 允许您为/atg/dynamo/service/SMTPEmail/组件配置默认值,我认为您缺少相关环境的配置。我建议您打开 dyn/admin 并比较 SMTP 电子邮件的配置,以了解工作环境与不工作环境。


推荐阅读