SORRY: forget to include class name

I think there may be a bug in the above class in the "sendMessage" 
method.


---------------------------------------------------
public void sendMessage(MimeMessage message, InternetAddress[] 
recipients)
throws MessagingException {
        if (recipients.length == 0)
                return;
        String host = recipients[0].toString();
        host = host.substring (host.indexOf ("@") + 1);

etc.etc.
---------------------------------------------------


The value of "host" seems to include the final angle bracket ">" of the
address. Instead, could you not use:


        String host = recipients[0].getAddress();

this string omits the angle brackets

---------------------------------------------------

Regards,

Alan



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to