【发布时间】:2012-05-02 03:40:10
【问题描述】:
我最近在 groovy 中使用 antbuilder 邮件任务时遇到问题。它总是抛出以下异常:
[mail] 发送邮件:null
[mail] 发送邮件失败:0
捕获: : java.lang.ArrayIndexOutOfBoundsException: 0
我认为问题只是在新的 1.7.2 版本发布时出现的,但我不能确定。
这里是sn-p:
ant = new AntBuilder()
ant.mail(mailhost:'localhost',mailport:'25',subject:'Hello Ant World',messagemimetype:'text/html') {
from(address:'changed@to.protect.the.innocent')
to(address:'changed@to.protect.the.innocent')
message('Hello ant world!')
}
知道如何让它工作吗? 谢谢,英戈
【问题讨论】: