<div dir="ltr"><div>Thanks a lot :-) I missed that issue.<br><br></div>Regards,<br>Arend<br><br><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 24, 2013 at 4:33 PM, Abraham Lin <span dir="ltr"><<a href="mailto:abraham.lin@post.harvard.edu" target="_blank">abraham.lin@post.harvard.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There's an existing JIRA issue on this: <a href="http://jira.qos.ch/browse/LOGBACK-865" target="_blank">http://jira.qos.ch/browse/LOGBACK-865</a></div>


<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Jun 24, 2013 at 9:31 AM, Mads Bondo Dydensborg <span dir="ltr"><<a href="mailto:mbd@dbc.dk" target="_blank">mbd@dbc.dk</a>></span> wrote:<br>




</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><u></u>
<div style="font-family:'Ubuntu';font-size:9pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">The stmp standard dictates that a header field is terminated by a new line. An empty line terminates the list of header fields.</p>





<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">The relevante info is in 3.1.3 of the 822 RC, I guess:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'"> 3.1.3.  UNSTRUCTURED FIELD BODIES</span></p>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;font-family:'Courier New,courier'"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        For some fields, such as "Subject" and "Comments",  no  struc-</span></pre>





<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        turing  is assumed, and they are treated simply as <text>s, as</span></pre>





<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        in the message body.  Rules of folding apply to these  fields,</span></pre>





<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        so  that  such  field  bodies  which occupy several lines must</span></pre>





<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        therefore have the second and successive lines indented by  at</span></pre>





<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">        least one LWSP-char.</span></pre>
<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px;font-family:'Courier New,courier'"><br></pre>
<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">So, it looks like a bug in the SMTP appender or some software it uses.</span></pre>





<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px;font-family:'Courier New,courier'"><br></pre>
<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">Regards</span></pre>
<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px;font-family:'Courier New,courier'"><br></pre>
<pre style="margin-top:0px;margin-bottom:12px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'Courier New,courier'">Mads</span></pre>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Mandag 24 juni 2013 13:00:46 skrev Arend v. Reinersdorff:<br></p><div><div>
<p style="margin-top:12px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Hi,<br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">when I a log message with a double linebreak "A\n\nA" to SMTPAppender, the resulting Email is not formatted properly.<br>




<br>The MIME parts are not parsed but are display as the message body. It looks like the double linebreak is written directly into the Subject-Header.<br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">With a single linebreak I get the same problem in Gmail. In Outlook the email is formatted properly, only the subject is cut at the linebreak.<br>




</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Could this be a bug in Logback?<br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Regards,<br>Arend<br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px"><br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Logging call:<br>LoggerFactory.getLogger(Main.class).error("A\n\nA");<br><br><br>logback.xml:<br><configuration><br>




    <root><br>        <appender class="ch.qos.logback.classic.net.SMTPAppender"><br>            <smtpHost>... smtpHost</smtpHost><br>            <to>... email</to><br>            <subject>%logger{10} - %message</subject><br>




            <layout class="ch.qos.logback.classic.PatternLayout"><br>                <pattern>%logger{10} - %message</pattern><br>            </layout><br>        </appender><br>    </root><br>




</configuration><br><br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Email subject:<br>c.e.l.Main - A<br><br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Visible email body:<br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">A<br>MIME-Version: 1.0<br>Content-Type: multipart/mixed; <br>    boundary="----=_Part_0_14393847.1372070958822"<br><br>




------=_Part_0_14393847.1372070958822<br>Content-Type: text/plain; charset=UTF-8<br>Content-Transfer-Encoding: 7bit<br><br>c.e.l.Main - A<br>A<br>------=_Part_0_14393847.1372070958822--<br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">Email source:<br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">... email headers<br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">To: ...<br>Message-ID: ...<br>Subject: c.e.l.Main - A<br><br>A<br>MIME-Version: 1.0<br>Content-Type: multipart/mixed; <br>    boundary="----=_Part_0_14393847.1372070958822"<br>




<br>------=_Part_0_14393847.1372070958822<br>Content-Type: text/plain; charset=UTF-8<br>Content-Transfer-Encoding: 7bit<br><br>c.e.l.Main - A<br>A<br>------=_Part_0_14393847.1372070958822--<br><br><br></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br><br></p>
</div></div><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">-- </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Med venlig hilsen/Regards</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Chefarkitekt/Chief Architect cand.scient.dat, Ph.d., Mads Bondo Dydensborg</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. <a href="tel:%2B45%2029%2084%2000%2042" value="+4529840042" target="_blank">+45 29 84 00 42</a></p>





<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p></div><br></div></div>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div></div></div></div>