mailServer = spec.getMailServer();
String protocol = spec.getStoreProtocol();
folderName = spec.getMailFolder();
userName = spec.getUserName();
password = spec.getPassword();
sessionProps = new Properties();
sessionProps.setProperty("mail.transport.protocol", "smtp");
sessionProps.setProperty("mail.store.protocol", protocol);
sessionProps.setProperty("mail.smtp.host", mailServer);