使用 Spring VelocityEngineutil 的 Google Appengine CRON 任务
我正在尝试在应用程序引擎中编写一个 cron 任务,用于通过在 Spring VelocityEngineutils 中调用 mergetemplatewithstring 来发送电子邮件。
不幸的是,它没有抛出任何异常,但邮件从未发送。有人有任何指点吗?
I am trying to write a cron task in app engine for sending emails by calling mergetemplatewithstring in spring velocityengineutils.
Unfortunately it does not throw any exception but the mail is never sent. Anyone has any pointers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也面临着类似的问题。我的 Cron servlet 被触发,并且日志记录表明在调用 mergeTemplateWithStrings 时它失败。就我而言,VelocityEngine 为空。
我确信您代码中的某些 java 类未初始化。交叉检查您的代码,一旦确保所有类都已初始化,它就应该可以工作。
I was facing similar issues. My Cron servlet was triggered and logging indicates that it fails when the call to mergeTemplateWithStrings is called. In my case VelocityEngine was null.
I am sure that some of the java class in your code is not initialized. Cross check your code and it should work once you ensure all classes are initialized.