Ant MailLogger 不发送电子邮件
我像这样运行 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于这个问题从未被标记为已解决,我只是复制 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!