Reputation: 1
I recently have a problem using the antbuilder mail task in groovy. It always throws the following exception:
[mail] Sending email: null
[mail] Failed to send email: 0
Caught: : java.lang.ArrayIndexOutOfBoundsException: 0
I think the problem just occurred with the release of the new 1.7.2 version, but I cannot be sure of it.
Here is the snippet:
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!')
}
Any idea how to get this working? Thanks, Ingo
Upvotes: 0
Views: 952
Reputation: 940
Yes, you are absolutely right. By just removing that jar it works. Thanks. But since I use the groovyws lib I had to work it out with plain javax.mail code...
Upvotes: 0
Reputation: 11
I found the problem was that i had GroovyWS in my classpath. See: http://jira.codehaus.org/browse/GMOD-55
Upvotes: 1