John Scott Brown created LOG4J2-2548:
----------------------------------------

             Summary: SMTP TLS support request
                 Key: LOG4J2-2548
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2548
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.11.0
         Environment: Linux server-2 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 
14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
            Reporter: John Scott Brown
             Fix For: 2.11.0
         Attachments: GmailAppender.java, GmailManager.java

For various reasons I am trying to use Gmail as my SMTP server for outgoing 
messages. I ran into two issues which I am reporting separately. The first 
issue was that the only I could use a gmail account for such a server is if I 
used port 587 with TLS. I tried port 465 with SSL but couldn't connect, but, 
the former combination does work. This means being able to add the properties:

props.put("mail.smtp.auth", "true");
 props.put("mail.smtp.starttls.enable", "true");

to the javamail session initiator. 

I wound up writing a custom appender based on SMTP appender and manager that 
provided this feature. I am dropping in this code for reference only. It is 
intended for Gmail only and is not production worthy.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to