if (to == null || to.equals(""))
to = headers.get("to");
Properties props = new Properties();
StringValue host = env.getIni("SMTP");
if (host != null && ! host.toString().equals(""))
props.put("mail.smtp.host", host.toString());
else if (System.getProperty("mail.smtp.host") != null)
props.put("mail.smtp.host", System.getProperty("mail.smtp.host"));
StringValue port = env.getIni("smtp_port");
if (port != null && ! port.toString().equals(""))
props.put("mail.smtp.port", port.toString());
else if (System.getProperty("mail.smtp.port") != null)
props.put("mail.smtp.port", System.getProperty("mail.smtp.port"));
if (System.getProperty("mail.smtp.class") != null)
props.put("mail.smtp.class", System.getProperty("mail.smtp.class"));
StringValue user = null;
if (headers.get("from") != null)
user = env.createStringOld(headers.get("from"));
if (user == null)
user = env.getIni("sendmail_from");
if (user != null && ! user.toString().equals("")) {
String userString = user.toString();
/*
int p = userString.indexOf('<');
int q = userString.indexOf('>');