Coldfusion计划任务不发送电子邮件
当我们通过 CFAdmin 运行计划任务时,任务内用于发送电子邮件的代码不会发送该电子邮件。但是,如果我们在浏览器中单独运行任务 URL,则会发送电子邮件。有人遇到过类似的问题吗?
When we run a scheduled task through CFAdmin, code inside the task that is meant to send an email does not send that email. But, if we run the task url in a browser on its own, the email is sent. Anybody come across a similar issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在没有看到任何实际代码的情况下很难说太多,但我可以在其他都很好的响应之上提出一些盲目的建议。
(抱歉,这不是真正的“答案”,但我认为对于“评论”来说太长了)。
反馈一些更好的信息,我们可以从那里开始......
It's difficult to say too much without seeing any actual code, but I can make some blind suggestions over and above the other responses which are all good.
(sorry, this isn't really an "answer", but it's too long for just a "comment" I think).
Feed back some better info, and we can go from there...
我猜测当您通过浏览器运行任务时,您已经以不同的方式对您的应用程序进行了身份验证,这就是它在浏览器中运行的原因 - 即您有一个正确的会话。
如果您更新计划任务以采取其他操作(例如写入日志文件),这有效吗?我认为问题不在于电子邮件,而在于流程的其余部分。
I'm guessing that when you run the task through a browser that you have authenticated to your app differently and that's why it runs in the browser - ie you have a proper session.
If you update your scheduled task to take some other action - eg write to a log file - does that work? I think the problem is not with the email but with the rest of the process.
您需要检查计划任务的以下步骤
You need to check following steps for your schedule task