@social-mail/social-mail-web-server 1.4.702 → 1.4.704

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.4.702",
3
+ "version": "1.4.704",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -5,6 +5,7 @@ import FileLineReader from "../core/LineReader.js";
5
5
  import SocketClient from "../socket/client/SocketClient.js";
6
6
  import os from "node:os";
7
7
  import DnsService from "../../server/smtp/dns/DnsService.js";
8
+ import { SmtpStatusCodes } from "../../server/smtp/client/SmtpStatusCodes.js";
8
9
 
9
10
  export interface ISmtpAuth {
10
11
  login: {
@@ -108,7 +109,12 @@ export default class ESmtpClient {
108
109
  };
109
110
  }
110
111
  await this.send(from, to, file);
111
- } catch (error) {
112
+ return {
113
+ logs,
114
+ status: "250",
115
+ statusCode: SmtpStatusCodes.Ok,
116
+ };
117
+ } catch (error) {
112
118
  if (error instanceof SmtpError) {
113
119
  return {
114
120
  logs,
@@ -9,7 +9,7 @@ import GraphService from "@entity-access/server-pages/dist/services/GraphService
9
9
  const syncDirectionArray = ["in", "out"] as const;
10
10
  export type syncDirectionType = typeof syncDirectionArray[number];
11
11
 
12
- const syncProtocolArray = ["imap"] as const;
12
+ const syncProtocolArray = ["imap", "smtp"] as const;
13
13
  export type syncProtocolType = typeof syncProtocolArray[number];
14
14
 
15
15
  const syncStatusArray = ["none", "success", "failed"] as const;
@@ -107,7 +107,7 @@ export default class DispatchEmailToMX extends Workflow<IMessageEnvelope> {
107
107
 
108
108
  const st = await db.mailboxSyncTargets
109
109
  .where(this.input, (p) => (x) => x.mailboxID === p.senderID
110
- && x.direction === "out"
110
+ && (x.direction === "out" || x.protocol === "smtp")
111
111
  && x.active === true)
112
112
  .first();
113
113