// create some properties and get the default Session
Properties props = new Properties();
props.put(MAIL_SMTP_HOST, smtpHost);
props.put(MAIL_SMTP_PORT, smtpPort); // property values are strings
Authenticator authenticator = null;
if(mailAuthType != MailAuthType.NONE) {
props.put(MAIL_SMTP_AUTH, "true");
switch (mailAuthType) {
case SSL:
props.put(MAIL_SMTP_SOCKETFACTORY_CLASS,