Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 406 additions & 0 deletions src/mail/imap-smtp/actions.ts

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/mail/imap-smtp/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const mailImapPort: number = 993;
export const mailSmtpPort: number = 465;
export const mailMessageFetchByteLimit: number = 5 * 1024 * 1024;
export const mailAttachmentDownloadByteLimit: number = 25 * 1024 * 1024;
export const mailConnectionTimeoutMs: number = 30_000;
10 changes: 10 additions & 0 deletions src/mail/imap-smtp/errors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type MailProtocolErrorKind = "auth" | "folder_not_found" | "uid_not_found" | "timeout" | "network" | "provider";

export class MailProtocolError extends Error {
readonly kind: MailProtocolErrorKind;

constructor(kind: MailProtocolErrorKind, message: string) {
super(message);
this.kind = kind;
}
}
Loading
Loading