fix : test email : more detail
This commit is contained in:
@@ -255,7 +255,7 @@ export class EmailSpamService {
|
||||
}
|
||||
|
||||
// Check for emails from this sender in various mailboxes
|
||||
let emailsFromSender: any = {
|
||||
const emailsFromSender: any = {
|
||||
inbox: [],
|
||||
junk: [],
|
||||
trash: [],
|
||||
@@ -264,8 +264,6 @@ export class EmailSpamService {
|
||||
};
|
||||
|
||||
try {
|
||||
const mailboxIds = await this.mailboxResolverService.getUserMailboxIds(wildduckUserId);
|
||||
|
||||
// Search for messages from this sender domain
|
||||
const searchQuery = { from: `@${senderDomain}`, limit: 50 };
|
||||
const searchResults = await firstValueFrom(this.mailServerService.messages.searchMessages(wildduckUserId, searchQuery));
|
||||
@@ -276,11 +274,6 @@ export class EmailSpamService {
|
||||
// Check which mailbox each message is in
|
||||
for (const message of searchResults.results) {
|
||||
try {
|
||||
// Get message details to find mailbox
|
||||
const messageDetails = await firstValueFrom(
|
||||
this.mailServerService.messages.getMessage(wildduckUserId, message.mailbox, message.id)
|
||||
);
|
||||
|
||||
const mailboxName = await this.mailboxResolverService.getMailboxName(wildduckUserId, message.mailbox);
|
||||
|
||||
if (mailboxName === "INBOX") {
|
||||
@@ -312,7 +305,7 @@ export class EmailSpamService {
|
||||
date: message.date,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
// Skip if we can't get message details
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user