我最近在groovy中使用antbuilder郵件任務時遇到了問題。它總是拋出以下異常:Groovy中使用antbuilder郵件任務的問題1.7.2
[郵件]發送電子郵件:空
[郵件]無法發送電子郵件:0
捉住:java.lang.ArrayIndexOutOfBoundsException:0
我認爲問題剛剛發生在新版本1.7.2的發佈中,但我無法確定。
下面是摘錄:
ant = new AntBuilder()
ant.mail(mailhost:'localhost',mailport:'25',subject:'Hello Ant World',messagemimetype:'text/html') {
from(address:'[email protected]')
to(address:'[email protected]')
message('Hello ant world!')
}
任何想法如何得到這個工作? 謝謝,英戈
請在此處添加該鏈接的相關內容到您的答案。考慮一下如果鏈接被破壞,你的答案的實用性會發生什麼。 – Ren 2012-12-06 13:11:43