smtp.sendMessage(msg, new Address[] { addr });
Address[] addr = new Address[addrList.size()]; addrList.toArray(addr);  smtp.sendMessage(msg, addr);
  public static boolean mail(Env env,			     String to,			     String subject,			     String message,			     @Optional String additionalHeaders,			     @Optional String additionalParameters)  {    Transport smtp = null;    try {      Properties props = new Properties();      StringValue host = env.getIni("SMTP");      if (host != null && ! host.toString().equals(""))	props.put("mail.smtp.host", host.toString());      StringValue port = env.getIni("smtp_port");      if (port != null && ! port.toString().equals(""))	props.put("mail.smtp.port", port.toString());      StringValue user = env.getIni("sendmail_from");      if (user != null && ! user.toString().equals(""))	props.put("mail.from", user.toString());      Session mailSession = Session.getInstance(props, null);      smtp = mailSession.getTransport("smtp");      MimeMessage msg = new MimeMessage(mailSession);      msg.setFrom();      msg.setSubject(subject);      msg.setText(message);      Address addr = new InternetAddress(to);      msg.addRecipient(Message.RecipientType.TO, addr);      if (additionalHeaders != null)	addHeaders(msg, additionalHeaders);      smtp.connect();      smtp.sendMessage(msg, new Address[] { addr });      log.fine("quercus-mail: sent mail to " + to);      return true;    } catch (RuntimeException e) {      log.log(Level.FINER, e.toString(), e);      throw e;    } catch (MessagingException e) {      log.log(Level.FINE, e.toString(), e);      env.warning(e.getMessage());      return false;    } catch (Exception e) {      log.log(Level.FINE, e.toString(), e);      env.warning(e.toString());      return false;    } finally {      try {	if (smtp != null)	  smtp.close();      } catch (Exception e) {	log.log(Level.FINER, e.toString(), e);      }    }  }