[logback-dev] [JIRA] Updates for LOGBACK-1588: SMTPAppender code does not comply with documentation and c.s.m.s.SMTPTransport default config
QOS.CH (JIRA)
noreply-jira at qos.ch
Mon Nov 15 11:08:00 CET 2021
logback / LOGBACK-1588 [Open]
SMTPAppender code does not comply with documentation and c.s.m.s.SMTPTransport default config
==============================
Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.
View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1588
==============================
Issue created
------------------------------
Michael Osipov created this issue on 15/Nov/21 10:52 AM
Summary: SMTPAppender code does not comply with documentation and c.s.m.s.SMTPTransport default config
Issue Type: Bug
Affects Versions: 1.3.0-alpha10
Assignee: Logback dev list
Components: logback-classic, logback-core
Created: 15/Nov/21 10:52 AM
Environment:
The documentation [here](http://logback.qos.ch/manual/appenders.html#SMTPAppender) says:
{{stmpHost}} is mandatory and {{smtpPort}} is by default 25. Looking at the code of {{SMTPAppenderBase}} is mandatory value is not enforced, it does:
{code:java}
if (smtpHost != null) {
props.put("mail.smtp.host", smtpHost);
}
{code}
Looking at {{c.s.m.s.SMTPTransport}} both are optional and default values:
{code:java}
718 * If port is not specified, set it to value of mail.smtp.port
719 * property if it exists, otherwise default to 25.
720 */
721 if (port == -1)
722 port = PropUtil.getIntProperty(props,
723 "mail." + name + ".port", -1);
724 if (port == -1)
725 port = defaultPort;
726
727 if (host == null || host.length() == 0)
728 host = "localhost";
{code}
Both Logback code and documentation should be updated according to it. No need to supply/require both at all.
Priority: Major
Reporter: Michael Osipov
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the logback-dev
mailing list