logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@aconex.com>
Subject Re: error while sending mail to gmail (must issue a starttls command)
Date Mon, 04 Apr 2005 22:36:34 GMT


>While searching on the net I found that I should set the starttls
>property as
>property.put("mail.smtp.starttls.enable","true");
>
>  
>
Where do you make this call?  You'll need to set it as a System property 
BEFORE the SMTPAppender is configured, as it creates the Properties 
bundle during activation: 

SMTPAppender: line 112 (from HEAD)
...
    Properties props = new Properties(System.getProperties());

    if (smtpHost != null) {
      props.put("mail.smtp.host", smtpHost);
    }

    Session session = Session.getInstance(props, null);


cheers,

Paul

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


Mime
View raw message