Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1438 → Rev 1439

/branches/v3/impl/src/java/pt/estgp/estgweb/services/email/SendEmailService.java
58,7 → 58,8
 
 
// Set up properties for mail session
Properties props = System.getProperties();
//Properties props = System.getProperties();
Properties props = new Properties();
props.put("mail.smtp.host", Globals.EMAIL_SERVER_HOST);
final String username = Globals.EMAIL_SERVER_USERNAME;
final String password = Globals.EMAIL_SERVER_PASSWORD;
66,6 → 67,7
if(Globals.SYSTEM_EMAIL_USE_SECURITY && Globals.EMAIL_SERVER_SECURITY != null && Globals.EMAIL_SERVER_SECURITY.compareTo("TLS")==0)
{
logger.info("Using Email Security TLS");
props.setProperty("mail.transport.protocol", "smtp");//todo new
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.port", ""+ Globals.EMAIL_SERVER_SECURITY_TLS);
80,6 → 82,7
else if(Globals.SYSTEM_EMAIL_USE_SECURITY && Globals.EMAIL_SERVER_SECURITY != null && Globals.EMAIL_SERVER_SECURITY.compareTo("SSL")==0)
{
logger.info("Using Email Security SSL");
props.setProperty("mail.transport.protocol", "smtp");//todo new
props.put("mail.smtp.socketFactory.port", Globals.EMAIL_SERVER_SECURITY_SSL);
props.put("mail.smtp.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");