Skip to content
Snippets Groups Projects

[Email Thread] Display registered and not registered receivers

Merged Alexey Lunin requested to merge 401-display-registered-and-not-registered-in-email into master
All threads resolved!
Files
3
@@ -154,7 +154,7 @@ export function parseMIME(mime) {
parts.push({
indices: { from: 0, to: mime.length, headersEnd: headersEnd },
headers: headers,
headers,
boundary: "mimemessage"
});
@@ -162,19 +162,11 @@ export function parseMIME(mime) {
}
function getHeaderValue(header, part) {
if (part.headers !== null && part.headers !== undefined) {
if (part.headers[header] !== null && part.headers[header] !== undefined) {
if (part.headers[header].length > 0) {
return part.headers[header];
} else {
return null;
}
} else {
return null;
}
} else {
return null;
if (part.headers && part.headers[header] && part.headers[header].length) {
return part.headers[header];
}
return null;
}
export function getGlobalHeaderValue(header, parts) {
@@ -198,7 +190,7 @@ function getBody(mime, part) {
}
export function decodeMimeBody(descriptor, mimeString) {
let mimeBody = mimeString.slice(
const mimeBody = mimeString.slice(
descriptor.indices.headersEnd,
descriptor.indices.to
);
@@ -308,7 +300,9 @@ export function getPlain(mime, parts) {
break;
}
}
if (!plainPart) {
return "";
}
plain = decodeMimeBody(plainPart, mime);
return plain;
}
Loading