java - 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
解决方案
To
我的猜测是您的其中一个电子邮件地址在orFrom
字段中均无效。
ATG 允许您为/atg/dynamo/service/SMTPEmail/
组件配置默认值,我认为您缺少相关环境的配置。我建议您打开 dyn/admin 并比较 SMTP 电子邮件的配置,以了解工作环境与不工作环境。
推荐阅读
- vaticle-typedb - 如何编写一个在两个日期之间查找属性的 Graql 查询?
- bash - 如何使用 json 数据在 curl 中添加断线?
- java - 如何根据收到的参数使用 JPA 创建具有分页结果的自定义动态查询
- react-native - 在 React Native 中选择正常的答案后更改边框颜色?
- python - 如何使用 Python 对该列表进行排序
- r - 是否可以创建一个自渲染的 Rmarkdown 文档?
- stackdriver - Google Cloud Function 日志显示信息日志类型的错误图标
- c# - 完成后立即关闭 StreamWriter 是最佳做法吗?或者我可以让它保持打开状态,直到程序完成运行并关闭它?
- android - Android : 如何在我的应用程序中拦截 Android 系统音量面板 UI?
- javascript - JS - IntersectionObserver - 参数 1 未实现接口元素