props.put("mail.smtp.connectiontimeout", smtpConnectionTimeOut);
props.put("mail.smtp.timeout", smtpTimeOut);
if (mailTls) {
props.put("mail.smtp.starttls.enable", "true");
MailSSLSocketFactory sf = new MailSSLSocketFactory();
sf.setTrustAllHosts(true);
props.put("mail.smtp.ssl.socketFactory", sf);
}
// Check for Authentication
Session session = null;