<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Makes sense. Thanks!<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="font-size: medium; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px; ">Joe Wang</span></font></div><div><font class="Apple-style-span" size="2"><br></font></div></div></div></span></div></span></div></span></div></span></div><div><div>On Jan 17, 2012, at 11:40 AM, ceki wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Hi Joe,<br><br>Lines 188 and 189 of SMTPAppenderBase should answer the question. Please see <a href="http://goo.gl/czvS4">http://goo.gl/czvS4</a><br><br>HTH,<br><br>-- <br>Ceki<br><a href="http://twitter.com/#!/">http://twitter.com/#!/</a>ceki<br><br><br>On 17.01.2012 17:17, Joe Wang wrote:<br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I see in the docs (<a href="http://logback.qos.ch/manual/appenders.html">http://logback.qos.ch/manual/appenders.html</a>) it says<br></blockquote><blockquote type="cite">"SMTP email transmission (sending) is performed asynchronously". I'm<br></blockquote><blockquote type="cite">looking on grepcode.com at version 1.2.25. I can't see how it is sending<br></blockquote><blockquote type="cite">asynchronously.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">SMTPAppender.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">void [More ...] <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#</a>>append <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/AppenderSkeleton.java#AppenderSkeleton.append%28org.apache.log4j.spi.LoggingEvent%29">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/AppenderSkeleton.java#AppenderSkeleton.append%28org.apache.log4j.spi.LoggingEvent%29</a>>(LoggingEvent <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/spi/LoggingEvent.java#LoggingEvent">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/spi/LoggingEvent.java#LoggingEvent</a>> event) {<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> sendBuffer <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#SMTPAppender.sendBuffer%28%29">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#SMTPAppender.sendBuffer%28%29</a>>();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">void [More ...] <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#</a>>sendBuffer() {<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Transport.send <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.send%28javax.mail.Message%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.send%28javax.mail.Message%29</a>>(msg <<a href="http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#SMTPAppender.0msg">http://grepcode.com/file/repository.springsource.com/org.slf4j/com.springsource.slf4j.nlog4j/1.2.25/org/apache/log4j/net/SMTPAppender.java#SMTPAppender.0msg</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> ...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Transport.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">public static void [More ...] <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>>send(Message <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message</a>> msg, Address <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Address.java#Address%5B%5D">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Address.java#Address%5B%5D</a>>[] addresses)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">throws MessagingException<br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/MessagingException.java#MessagingException">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/MessagingException.java#MessagingException</a>><br></blockquote><blockquote type="cite">{<br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>msg.saveChanges <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message.saveChanges%28%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message.saveChanges%28%29</a>>();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>send0 <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.send0%28javax.mail.Message%2Cjavax.mail.Address%5B%5D%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.send0%28javax.mail.Message%2Cjavax.mail.Address%5B%5D%29</a>>(msg, addresses);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">private static void [More ...] <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>>send0(Message <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Message.java#Message</a>> msg, Address <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Address.java#Address%5B%5D">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Address.java#Address%5B%5D</a>>[] addresses)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">throws MessagingException<br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/MessagingException.java#MessagingException">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/MessagingException.java#MessagingException</a>>{<br></blockquote><blockquote type="cite">...<<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>/*<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> * Optimize the case of a single protocol.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> */<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>if (dsize == 1) {<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> transport = s.getTransport <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Session.java#Session.getTransport%28javax.mail.Address%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Session.java#Session.getTransport%28javax.mail.Address%29</a>>(addresses[0]);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> try {<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>transport.connect <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Service.java#Service.connect%28%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Service.java#Service.connect%28%29</a>>();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>transport.sendMessage <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.sendMessage%28javax.mail.Message%2Cjavax.mail.Address%5B%5D%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#Transport.sendMessage%28javax.mail.Message%2Cjavax.mail.Address%5B%5D%29</a>>(msg, addresses);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> } finally {<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>transport.close <<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Service.java#Service.close%28%29">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Service.java#Service.close%28%29</a>>();<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> }<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> return;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><<a href="http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#">http://grepcode.com/file/repository.springsource.com/javax.mail/com.springsource.javax.mail/1.4.1/javax/mail/Transport.java#</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>slf4j-user mailing list<br><a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>http://mailman.qos.ch/mailman/listinfo/slf4j-user<br></div></blockquote></div><br></body></html>