You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/05/31 23:14:58 UTC
DO NOT REPLY [Bug 45109] New: SMTPAppender uses wrong property for
mail server
https://issues.apache.org/bugzilla/show_bug.cgi?id=45109
Summary: SMTPAppender uses wrong property for mail server
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Windows Vista
Status: NEW
Severity: normal
Priority: P2
Component: Appender
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: chris@die-schneider.net
SMTPAppender always sends to localhost as it seems to set the wrong property in
the session.
In the createSession method SMTPAppender sets the property "mail.smtp.host"
if (smtpHost != null) {
props.put("mail.smtp.host", smtpHost);
}
Then it calls Transport.send which tries to read the protocol from the url
in the class Service
if (url != null) {
host = url.getHost();
// it is possible that this could return null (rare). If it
does, try to get a
// value from a protocol specific session variable.
if (host == null) {
host = session.getProperty("mail." + protocol + ".host");
}
}
But as url is null the mail.smtp.host is not read correctly. So host stays null
and the appender connects to localhost.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 45109] SMTPAppender uses wrong property for mail
server
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45109
Thorbjørn Ravn Andersen <th...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |45527
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 45109] SMTPAppender uses wrong property for mail
server
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45109
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Curt Arnold <ca...@apache.org> 2008-10-15 12:55:21 PST ---
As described, it would seem to imply that SMTPAppender should never work except
for SMTP servers on the same machine. That isn't consistent with my experience
and it seems unlikely that if the problem was that universal, it would not have
been reported previously.
I am successfully and sending email messages using SSL to smtp.google.com and
if I turn off SSL, I get an exception message that specifies "Could not connect
to SMTP host: smtp.google.com, port 25" which indicates that the JavaMail
implementation is not ignoring the specified SMTPHost.
You did not identify the source for your snippet of Transport.send(). If you
are using an atypical implementation, it would be good if you would identify
it. If SMTPAppender works with more common JDK libraries and not with yours,
then it would likely be a problem with your JDK's implementation of
Transport.send().
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 45109] SMTPAppender uses wrong property for mail
server
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45109
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks|45527 |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org