Web.xml provides servlet support and belongs in the WEB-INF. If you would like this to be enabled, please contact Web Secure Support.
Properties props = new java.util.Properties();
props.put("mail.smtp.host", smtpHost);
Session session = Session.getDefaultInstance(props, null);
session.setDebug(false);
this.mailMsg = new MimeMessage(session);
InternetAddress fromAddress = new InternetAddress(mfrom);
InternetAddress[] toAddress = new InternetAddress[mto.length];
for (int i = 0; i < mto.length; i++)
{
toAddress[i] = new InternetAddress(mto[i]);
}
this.mailMsg.setFrom(fromAddress);
this.mailMsg.setRecipients(Message.RecipientType.TO, toAddress);
this.mailMsg.setSubject(subject);
this.mailMsg.setSentDate(new java.util.Date());
StringBuffer sb = new StringBuffer();
// set the body
this.mailMsg.setText(sb.toString());
// send the email
Transport.send(this.mailMsg);