1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-08-13 16:53:51 -04:00

SMTP: fixed two bugs, header ignored because of Exchange 2007 from patch and bccbuffer double xml encoding (=> Delivery status notification)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@516 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-04-11 13:38:11 +00:00
parent d70390a77b
commit 993f0c6a02

View File

@ -751,6 +751,13 @@ public class ExchangeSession {
while (!".".equals(line)) {
mailBuffer.append(line).append((char) 13).append((char) 10);
line = reader.readLine();
// Exchange 2007 : skip From: header
if ((inHeader && line.length() >= 5)) {
String prefix = line.substring(0, 5).toLowerCase();
if ("from:".equals(prefix)) {
line = reader.readLine();
}
}
if (inHeader && line.length() == 0) {
inHeader = false;
@ -765,13 +772,6 @@ public class ExchangeSession {
recipientBuffer.append(line);
}
}
// Exchange 2007 : skip From: header
if ((inHeader && line.length() >= 5)) {
String prefix = line.substring(0, 5).toLowerCase();
if ("from:".equals(prefix)) {
line = reader.readLine();
}
}
// patch thunderbird html in reply for correct outlook display
if (line != null && line.startsWith("<head>")) {
mailBuffer.append(line).append((char) 13).append((char) 10);
@ -792,9 +792,9 @@ public class ExchangeSession {
if (bccBuffer.length() > 0) {
bccBuffer.append(',');
}
bccBuffer.append("&lt;");
bccBuffer.append("<");
bccBuffer.append(recipient);
bccBuffer.append("&gt;");
bccBuffer.append(">");
}
String bcc = bccBuffer.toString();