fetching mailboxes from api
This commit is contained in:
@@ -47,7 +47,7 @@ imap.once("ready", function () {
|
||||
// });
|
||||
const promises = [];
|
||||
const mails = [];
|
||||
var f = imap.seq.fetch('1:10', {
|
||||
const f = imap.seq.fetch('1:10', {
|
||||
size: true,
|
||||
envelope: true
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ function saveMessage(attrs, mailboxId, imap) {
|
||||
async function saveFromParsedData(parsed, messageId) {
|
||||
const promises = [];
|
||||
Object.keys(parsed).forEach((key) => {
|
||||
if (["from", "to", "cc", "bcc", "reply-to"].includes(key)) {
|
||||
if (["from", "to", "cc", "bcc", "replyTo"].includes(key)) {
|
||||
promises.push(
|
||||
// save address field
|
||||
getFieldId(key).then((fieldId) => {
|
||||
|
||||
Reference in New Issue
Block a user