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 2004/07/23 15:23:32 UTC

DO NOT REPLY [Bug 30294] New: - SMTPAppender will not run within sandbox

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30294>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30294

SMTPAppender will not run within sandbox

           Summary: SMTPAppender will not run within sandbox
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Appender
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: s.podkowinski@virtual-solution.de


Please consider the following patch to make the Appender work in a restricted
sandbox environment.

84,87c84,92
<     Properties props = new Properties (System.getProperties());
<     if (smtpHost != null)
<       props.put("mail.smtp.host", smtpHost);
< 
---
>     Properties props = null;
>     try {
>       props = new Properties (System.getProperties());
>       if (smtpHost != null)
>         props.put("mail.smtp.host", smtpHost);
>     } catch(SecurityException se) {
>         props = new Properties();
>         props.put("mail.smtp.host", smtpHost);
>     }

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org