@ -330,8 +330,8 @@ ImapConnection.prototype.connect = function(loginCb) {
for (body = 0, lenb = bodies.length; body < lenb; body += 2) {
fetches = requests[0].fetchers[bodies[body]];
val = bodies[body + 1];
for (var i=0, len=fetches.length; i<len; ++i) {
parsed = undefined;
if (!fetches[i]._msg)
fetches[i]._msg = new ImapMessage();
@ -80,6 +80,12 @@ exports.parseFetchBodies = function(str, literals) {
bodies;
for (var i=0,len=result.length; i<len; i+=2) {
if (Array.isArray(result[i])) {
if (result[i].length > 1) {
// HEADER.FIELDS (foo)
result[i][0] += ' (';
result[i][0] += result[i].slice(1).join(' ');
result[i][0] += ')';
}
if (bodies === undefined)
bodies = ['BODY[' + result[i][0] + ']', result[i+1]];
else {