Ant MailLogger 不发送电子邮件

发布于 2024-12-29 22:58:33 字数 689 浏览 4 评论 0原文

我像这样运行 ant,以便收到包含构建日志的电子邮件: ant deployDB -logger org.apache.tools.ant.listener.MailLogger

这里或我的属性:

MailLogger.mailhost         = myhost
MailLogger.port=25
MailLogger.user             = myuser
MailLogger.password         = mypassword
MailLogger.from             = myfromemail
MailLogger.failure.to       = myreceipeemail
MailLogger.success.to       = myreceipeemail
MailLogger.failure.subject=[DRUPAL][MEP] ${TODAY} - Failure
MailLogger.success.subject=[DRUPAL][MEP] ${TODAY} - Success

我在末尾没有收到电子邮件构建,我没有错误消息。当我查看 /var/log/mail.info 时,没有关于应该发送的电子邮件的日志。

我用一个简单的 java 程序尝试了我的 postfix SMTP 服务器,参数完全相同,并且我确实收到了一封电子邮件,所以我猜我的 SMTP 服务器工作正常。

I run ant like this in order to have an email with the log of the build : ant deployDB -logger org.apache.tools.ant.listener.MailLogger

Here or my properties :

MailLogger.mailhost         = myhost
MailLogger.port=25
MailLogger.user             = myuser
MailLogger.password         = mypassword
MailLogger.from             = myfromemail
MailLogger.failure.to       = myreceipeemail
MailLogger.success.to       = myreceipeemail
MailLogger.failure.subject=[DRUPAL][MEP] ${TODAY} - Failure
MailLogger.success.subject=[DRUPAL][MEP] ${TODAY} - Success

I don't receive the email at the end of the build and I have no error message. When I look in /var/log/mail.info there is no log about the email which was supposed to be sent.

I tried my postfix SMTP server with a simple java program, with exactly the same params and I do receive an email, so I guess my SMTP server is working fine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁绊已千年 2025-01-05 22:58:33

由于这个问题从未被标记为已解决,我只是复制 Rebse 在评论中所说的内容。

这是一个类路径问题,mail.jar 不在其中。

谢谢雷布斯!

Since this question has never been marked as resolved I'm just copying what Rebse said in comment.

It was a classpath issue, mail.jar wasn't in it.

Thanks Rebse!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文