SMTPSend : java.lang.StringIndexOutOfBoundsException error

On my development machine, running developer, our application is able to send email. However on our server the transmission of email emitted from the very same version of our application is failing. The server log generates a line like the following everytime the application running on the server tries to send email

2006-03-15 14:40 : SMTPSend java.lang.StringIndexOutOfBoundsException: String index out of range: -1

I assume that the code that is failing is in the file lib/mail.jar however I am not certain about this.

I am wondering if email is sent from the server on behalf of the clients, or if all of the email requested by clients are sent by the server. The error message tends to suggest the latter eg: all mail is sent by the server.

I have very few ideas as to how to debug this problem and I am hoping that someone will be able to offer some guidance in this matter.

I have confirmed that the email server is reachable from the server. Also I have confirmed that the mail server is able to accept email based on our application by running the application under developer. I have also been able to send email using telnet to port 25 of the mail server from a command shell that is running on the server.

Our server is running Servoy version R2 2.2.2-build 334, repository version 27 with java.vm.version=1.5.0_02-b09

On my development machine I am running Version R2 2.2.4-build 336 with Java version 1.5.0_06-b05

Upgrade the server to 2.2.3 (or 2.2.4) and mail will work.