Project

General

Profile

« Previous | Next » 

Revision 62423

Remove condition in Email Sender about gmail smtp.

View differences:

modules/uoa-user-management/trunk/src/main/java/eu/dnetlib/openaire/user/utils/EmailSender.java
25 25

  
26 26
        // Get system properties
27 27
        Properties properties = System.getProperties();
28

  
29 28
        properties.put("mail.transport.protocol", "smtp");
30 29
        properties.put("mail.smtp.host", host);
31 30
        properties.put("mail.smtp.port", port);
32 31
        properties.put("mail.smtp.auth", auth);
33
        //Dev for sending email from gmail
34
        if(host.equals("smtp.gmail.com")) {
35
            properties.put("mail.smtp.ssl.protocols", "TLSv1.2");
36
            properties.put("mail.smtp.starttls.enable", "true");
37
            properties.put("mail.smtp.ssl.trust", "*");
38
        }
32
        properties.put("mail.smtp.ssl.protocols", "TLSv1.2");
33
        properties.put("mail.smtp.starttls.enable", "true");
34
        properties.put("mail.smtp.ssl.trust", "*");
39 35
        Session session = javax.mail.Session.getInstance(properties,
40 36
                new Authenticator() {
41 37
                    protected PasswordAuthentication getPasswordAuthentication() {

Also available in: Unified diff