|
|
|
@ -588,13 +588,7 @@ function parseStructExtra(part, partLen, cur, next) {
|
|
|
|
|
function parseFetchEnvelope(list) {
|
|
|
|
|
return {
|
|
|
|
|
date: new Date(list[0]),
|
|
|
|
|
subject: decodeWords(list[1], {
|
|
|
|
|
buffer: undefined,
|
|
|
|
|
encoding: undefined,
|
|
|
|
|
consecutive: false,
|
|
|
|
|
replaces: undefined,
|
|
|
|
|
curReplace: undefined
|
|
|
|
|
}),
|
|
|
|
|
subject: decodeWords(list[1]),
|
|
|
|
|
from: parseEnvelopeAddresses(list[2]),
|
|
|
|
|
sender: parseEnvelopeAddresses(list[3]),
|
|
|
|
|
replyTo: parseEnvelopeAddresses(list[4]),
|
|
|
|
@ -627,7 +621,7 @@ function parseEnvelopeAddresses(list) {
|
|
|
|
|
};
|
|
|
|
|
} else { // regular user address
|
|
|
|
|
var info = {
|
|
|
|
|
name: addr[0],
|
|
|
|
|
name: decodeWords(addr[0]),
|
|
|
|
|
mailbox: addr[2],
|
|
|
|
|
host: addr[3]
|
|
|
|
|
};
|
|
|
|
@ -879,6 +873,18 @@ function qEncReplacer(match, byte) {
|
|
|
|
|
}
|
|
|
|
|
function decodeWords(str, state) {
|
|
|
|
|
var pendoffset = -1;
|
|
|
|
|
|
|
|
|
|
if (!state) {
|
|
|
|
|
state = {
|
|
|
|
|
buffer: undefined,
|
|
|
|
|
encoding: undefined,
|
|
|
|
|
consecutive: false,
|
|
|
|
|
replaces: undefined,
|
|
|
|
|
curReplace: undefined,
|
|
|
|
|
remainder: undefined
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
state.replaces = [];
|
|
|
|
|
|
|
|
|
|
var bytes, m, next, i, j, leni, lenj, seq, replaces = [], lastReplace = {};
|
|
|
|
|