edge-mailer 0.6.0

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.
@@ -0,0 +1,323 @@
1
+ declare function encodeHeader(text: string): string;
2
+ type User = {
3
+ name?: string;
4
+ email: string;
5
+ };
6
+ type DsnOptions = {
7
+ envelopeId?: string;
8
+ RET?: {
9
+ HEADERS?: boolean;
10
+ FULL?: boolean;
11
+ };
12
+ NOTIFY?: {
13
+ DELAY?: boolean;
14
+ FAILURE?: boolean;
15
+ SUCCESS?: boolean;
16
+ NEVER?: boolean;
17
+ };
18
+ ORCPT?: string;
19
+ };
20
+ type MailBodyType = '7BIT' | '8BITMIME';
21
+ type MailEnvelopeOptions = {
22
+ from?: string;
23
+ to?: string | string[];
24
+ size?: number;
25
+ body?: MailBodyType;
26
+ smtpUtf8?: boolean;
27
+ requireTls?: boolean;
28
+ };
29
+ type AttachmentEncoding = 'base64' | 'quoted-printable' | '7bit';
30
+ type AttachmentDisposition = 'attachment' | 'inline';
31
+ type EmailAttachmentContent = string | Uint8Array | ArrayBuffer | ArrayBufferView | Blob;
32
+ type EmailAttachment = {
33
+ filename: string;
34
+ content: EmailAttachmentContent;
35
+ mimeType?: string;
36
+ contentType?: string;
37
+ encoding?: AttachmentEncoding;
38
+ contentId?: string;
39
+ disposition?: AttachmentDisposition;
40
+ };
41
+ type EmailOptions = {
42
+ from: string | User;
43
+ to: string | string[] | User | User[];
44
+ reply?: string | User;
45
+ cc?: string | string[] | User | User[];
46
+ bcc?: string | string[] | User | User[];
47
+ subject: string;
48
+ text?: string;
49
+ html?: string;
50
+ headers?: Record<string, string>;
51
+ attachments?: EmailAttachment[];
52
+ envelope?: MailEnvelopeOptions;
53
+ dsnOverride?: DsnOptions;
54
+ };
55
+ declare class Email {
56
+ readonly from: User;
57
+ readonly to: User[];
58
+ readonly reply?: User;
59
+ readonly cc?: User[];
60
+ readonly bcc?: User[];
61
+ readonly subject: string;
62
+ readonly text?: string;
63
+ readonly html?: string;
64
+ readonly envelope?: Omit<MailEnvelopeOptions, 'to'> & {
65
+ to?: string[];
66
+ };
67
+ readonly dsnOverride?: DsnOptions;
68
+ readonly attachments?: EmailAttachment[];
69
+ readonly headers: Record<string, string>;
70
+ setSent: () => void;
71
+ setSentError: (e: unknown) => void;
72
+ sent: Promise<void>;
73
+ constructor(options: EmailOptions);
74
+ private static toUsers;
75
+ private static toEnvelopeRecipients;
76
+ getMessageData(): string;
77
+ getMessageDataAsync(): Promise<string>;
78
+ private buildMessageData;
79
+ private resolveAttachments;
80
+ private resolveAttachmentsSync;
81
+ private attachmentBytes;
82
+ private isBlob;
83
+ private attachmentPart;
84
+ private attachmentDisposition;
85
+ private encodedAttachmentContent;
86
+ private attachmentTextContent;
87
+ private bytesToWrappedBase64;
88
+ private bytesToBase64;
89
+ private wrapBase64;
90
+ getEmailData(): string;
91
+ getEmailDataAsync(): Promise<string>;
92
+ static toSmtpData(data: string): string;
93
+ private static applyDotStuffing;
94
+ private generateSafeBoundary;
95
+ private getMimeType;
96
+ private resolveHeader;
97
+ private resolveFrom;
98
+ private resolveTo;
99
+ private resolveSubject;
100
+ private resolveReply;
101
+ private resolveCC;
102
+ }
103
+
104
+ type DkimConfig = {
105
+ domainName: string;
106
+ keySelector: string;
107
+ privateKey: string;
108
+ headerFieldNames?: string[];
109
+ };
110
+ declare function validateDkimConfig(dkim: DkimConfig | undefined): void;
111
+ declare function signDkimMessage(message: string, dkim: DkimConfig): Promise<string>;
112
+
113
+ declare enum LogLevel {
114
+ DEBUG = 0,
115
+ INFO = 1,
116
+ WARN = 2,
117
+ ERROR = 3,
118
+ NONE = 4
119
+ }
120
+
121
+ type SocketTlsMode = 'off' | 'on' | 'starttls';
122
+ type EdgeSocket = {
123
+ readable: ReadableStream<Uint8Array>;
124
+ writable: WritableStream<Uint8Array>;
125
+ opened?: Promise<unknown>;
126
+ closed?: Promise<void>;
127
+ close(reason?: unknown): Promise<void> | void;
128
+ startTls?(): EdgeSocket | Promise<EdgeSocket>;
129
+ };
130
+ type EdgeSocketConnectOptions = {
131
+ hostname: string;
132
+ port: number;
133
+ tls: SocketTlsMode;
134
+ signal?: AbortSignal;
135
+ };
136
+ type EdgeSocketConnector = {
137
+ connect(options: EdgeSocketConnectOptions): EdgeSocket | Promise<EdgeSocket>;
138
+ };
139
+
140
+ type AuthType = 'plain' | 'login' | 'cram-md5';
141
+ type Credentials = {
142
+ username: string;
143
+ password: string;
144
+ };
145
+ type BatchSendOptions = {
146
+ continueOnError?: boolean;
147
+ };
148
+ type SmtpRejectedRecipient = {
149
+ recipient: string;
150
+ response: string;
151
+ responseCode?: number;
152
+ enhancedStatusCode?: string;
153
+ transient: boolean;
154
+ };
155
+ type SmtpSendReceipt = {
156
+ messageId: string;
157
+ envelope: {
158
+ from: string;
159
+ to: string[];
160
+ };
161
+ accepted: string[];
162
+ rejected: SmtpRejectedRecipient[];
163
+ response: string;
164
+ responseCode?: number;
165
+ enhancedStatusCode?: string;
166
+ size: number;
167
+ };
168
+ type BatchSendResult = PromiseSettledResult<SmtpSendReceipt>[];
169
+ type PipeliningMode = 'auto' | false;
170
+ type SmtpBodyType = '7BIT' | '8BITMIME';
171
+ type SMTPStage = 'connect' | 'greet' | 'ehlo' | 'helo' | 'starttls' | 'auth' | 'mail' | 'rcpt' | 'data' | 'body' | 'rset' | 'quit' | 'send' | 'read';
172
+ type SMTPErrorOptions = {
173
+ stage: SMTPStage;
174
+ command?: string;
175
+ response?: string;
176
+ cause?: unknown;
177
+ };
178
+ declare class SMTPError extends Error {
179
+ readonly stage: SMTPStage;
180
+ readonly command?: string;
181
+ readonly response?: string;
182
+ readonly responseCode?: number;
183
+ readonly enhancedStatusCode?: string;
184
+ readonly transient: boolean;
185
+ readonly cause?: unknown;
186
+ constructor(message: string, options: SMTPErrorOptions);
187
+ }
188
+ type EdgeMailerOptions = {
189
+ host: string;
190
+ port: number;
191
+ secure?: boolean;
192
+ startTls?: boolean;
193
+ credentials?: Credentials;
194
+ authType?: AuthType | AuthType[];
195
+ logLevel?: LogLevel;
196
+ pipelining?: PipeliningMode;
197
+ dsn?: DsnOptions | undefined;
198
+ dkim?: DkimConfig | undefined;
199
+ pool?: SmtpPoolOptions | boolean | undefined;
200
+ socketTimeoutMs?: number;
201
+ responseTimeoutMs?: number;
202
+ };
203
+ type SmtpPoolOptions = {
204
+ maxConnections?: number;
205
+ maxMessagesPerConnection?: number;
206
+ idleTimeoutMs?: number;
207
+ };
208
+ declare class SmtpMailer {
209
+ private readonly connector;
210
+ private readonly host;
211
+ private readonly port;
212
+ private readonly secure;
213
+ private readonly startTls;
214
+ private readonly authType;
215
+ private readonly credentials?;
216
+ private readonly pipelining;
217
+ private readonly socketTimeoutMs;
218
+ private readonly responseTimeoutMs;
219
+ private socket?;
220
+ private reader;
221
+ private writer;
222
+ private responseBuffer;
223
+ private readonly logger;
224
+ private readonly dsn;
225
+ private readonly dkim;
226
+ private active;
227
+ private closeError?;
228
+ private sendChain;
229
+ private emailSending;
230
+ private queuedSendRejects;
231
+ /** SMTP server capabilities **/
232
+ private supportsDSN;
233
+ private supportsSize;
234
+ private maxMessageSize?;
235
+ private supports8BitMime;
236
+ private supportsSmtpUtf8;
237
+ private supportsRequireTls;
238
+ private allowAuth;
239
+ private authTypeSupported;
240
+ private supportsStartTls;
241
+ private supportsPipelining;
242
+ protected constructor(options: EdgeMailerOptions, connector: EdgeSocketConnector, runtimeName?: string);
243
+ send(options: EmailOptions): Promise<SmtpSendReceipt>;
244
+ sendMany(emails: EmailOptions[], options?: BatchSendOptions): Promise<BatchSendResult>;
245
+ close(error?: Error): Promise<void>;
246
+ isActive(): boolean;
247
+ protected initializeSmtpSession(): Promise<void>;
248
+ private sendEmail;
249
+ private canPipeline;
250
+ private prepareEmail;
251
+ private readTimeout;
252
+ private read;
253
+ private shiftResponse;
254
+ private writeLine;
255
+ private write;
256
+ private openSocket;
257
+ private waitForSocketConnected;
258
+ private greet;
259
+ private ehlo;
260
+ private helo;
261
+ private tls;
262
+ private resetCapabilities;
263
+ private parseCapabilities;
264
+ private auth;
265
+ private authWithPlain;
266
+ private authWithLogin;
267
+ private authWithCramMD5;
268
+ private mail;
269
+ private rcpt;
270
+ private data;
271
+ private envelopePipelined;
272
+ private body;
273
+ private createReceipt;
274
+ private rejectedRecipient;
275
+ private responseCode;
276
+ private enhancedStatusCode;
277
+ private rset;
278
+ private mailCommand;
279
+ private rcptCommand;
280
+ private recipients;
281
+ private mailFrom;
282
+ private mailParameters;
283
+ private rcptParameters;
284
+ private notificationParameter;
285
+ private retParameter;
286
+ private hasDsnRequest;
287
+ private needsSmtpUtf8;
288
+ protected abortConnection(error: unknown): Promise<void>;
289
+ private closedSendError;
290
+ private closeSocket;
291
+ private getSocket;
292
+ }
293
+
294
+ declare class SmtpConnectionPool<TMailer extends SmtpMailer> {
295
+ private readonly options;
296
+ private readonly connectMailer;
297
+ private readonly maxConnections;
298
+ private readonly maxMessagesPerConnection;
299
+ private readonly idleTimeoutMs;
300
+ private ready;
301
+ private busy;
302
+ private waitQueue;
303
+ private pendingCreates;
304
+ private pendingDestroys;
305
+ private totalConnections;
306
+ private closed;
307
+ constructor(options: EdgeMailerOptions, connectMailer: (options: EdgeMailerOptions) => Promise<TMailer>);
308
+ send(email: Parameters<TMailer['send']>[0]): Promise<SmtpSendReceipt>;
309
+ sendMany(emails: Parameters<TMailer['send']>[0][], options?: BatchSendOptions): Promise<BatchSendResult>;
310
+ close(): Promise<void>;
311
+ private acquire;
312
+ private release;
313
+ private dispatchWaiters;
314
+ private createBusyClient;
315
+ private createBusyClientInner;
316
+ private trackDestroy;
317
+ private destroy;
318
+ private destroyOnce;
319
+ private waitForDrained;
320
+ private clearIdleTimer;
321
+ }
322
+
323
+ export { type AttachmentDisposition as A, type BatchSendOptions as B, type Credentials as C, type DkimConfig as D, type EdgeMailerOptions as E, LogLevel as L, type MailBodyType as M, type PipeliningMode as P, SMTPError as S, type User as U, type AttachmentEncoding as a, type AuthType as b, type BatchSendResult as c, type DsnOptions as d, type EdgeSocketConnector as e, Email as f, type EmailAttachment as g, type EmailAttachmentContent as h, type EmailOptions as i, type MailEnvelopeOptions as j, type SMTPErrorOptions as k, type SMTPStage as l, type SmtpBodyType as m, SmtpConnectionPool as n, SmtpMailer as o, type SmtpPoolOptions as p, type SmtpRejectedRecipient as q, type SmtpSendReceipt as r, encodeHeader as s, signDkimMessage as t, validateDkimConfig as v };
@@ -0,0 +1,323 @@
1
+ declare function encodeHeader(text: string): string;
2
+ type User = {
3
+ name?: string;
4
+ email: string;
5
+ };
6
+ type DsnOptions = {
7
+ envelopeId?: string;
8
+ RET?: {
9
+ HEADERS?: boolean;
10
+ FULL?: boolean;
11
+ };
12
+ NOTIFY?: {
13
+ DELAY?: boolean;
14
+ FAILURE?: boolean;
15
+ SUCCESS?: boolean;
16
+ NEVER?: boolean;
17
+ };
18
+ ORCPT?: string;
19
+ };
20
+ type MailBodyType = '7BIT' | '8BITMIME';
21
+ type MailEnvelopeOptions = {
22
+ from?: string;
23
+ to?: string | string[];
24
+ size?: number;
25
+ body?: MailBodyType;
26
+ smtpUtf8?: boolean;
27
+ requireTls?: boolean;
28
+ };
29
+ type AttachmentEncoding = 'base64' | 'quoted-printable' | '7bit';
30
+ type AttachmentDisposition = 'attachment' | 'inline';
31
+ type EmailAttachmentContent = string | Uint8Array | ArrayBuffer | ArrayBufferView | Blob;
32
+ type EmailAttachment = {
33
+ filename: string;
34
+ content: EmailAttachmentContent;
35
+ mimeType?: string;
36
+ contentType?: string;
37
+ encoding?: AttachmentEncoding;
38
+ contentId?: string;
39
+ disposition?: AttachmentDisposition;
40
+ };
41
+ type EmailOptions = {
42
+ from: string | User;
43
+ to: string | string[] | User | User[];
44
+ reply?: string | User;
45
+ cc?: string | string[] | User | User[];
46
+ bcc?: string | string[] | User | User[];
47
+ subject: string;
48
+ text?: string;
49
+ html?: string;
50
+ headers?: Record<string, string>;
51
+ attachments?: EmailAttachment[];
52
+ envelope?: MailEnvelopeOptions;
53
+ dsnOverride?: DsnOptions;
54
+ };
55
+ declare class Email {
56
+ readonly from: User;
57
+ readonly to: User[];
58
+ readonly reply?: User;
59
+ readonly cc?: User[];
60
+ readonly bcc?: User[];
61
+ readonly subject: string;
62
+ readonly text?: string;
63
+ readonly html?: string;
64
+ readonly envelope?: Omit<MailEnvelopeOptions, 'to'> & {
65
+ to?: string[];
66
+ };
67
+ readonly dsnOverride?: DsnOptions;
68
+ readonly attachments?: EmailAttachment[];
69
+ readonly headers: Record<string, string>;
70
+ setSent: () => void;
71
+ setSentError: (e: unknown) => void;
72
+ sent: Promise<void>;
73
+ constructor(options: EmailOptions);
74
+ private static toUsers;
75
+ private static toEnvelopeRecipients;
76
+ getMessageData(): string;
77
+ getMessageDataAsync(): Promise<string>;
78
+ private buildMessageData;
79
+ private resolveAttachments;
80
+ private resolveAttachmentsSync;
81
+ private attachmentBytes;
82
+ private isBlob;
83
+ private attachmentPart;
84
+ private attachmentDisposition;
85
+ private encodedAttachmentContent;
86
+ private attachmentTextContent;
87
+ private bytesToWrappedBase64;
88
+ private bytesToBase64;
89
+ private wrapBase64;
90
+ getEmailData(): string;
91
+ getEmailDataAsync(): Promise<string>;
92
+ static toSmtpData(data: string): string;
93
+ private static applyDotStuffing;
94
+ private generateSafeBoundary;
95
+ private getMimeType;
96
+ private resolveHeader;
97
+ private resolveFrom;
98
+ private resolveTo;
99
+ private resolveSubject;
100
+ private resolveReply;
101
+ private resolveCC;
102
+ }
103
+
104
+ type DkimConfig = {
105
+ domainName: string;
106
+ keySelector: string;
107
+ privateKey: string;
108
+ headerFieldNames?: string[];
109
+ };
110
+ declare function validateDkimConfig(dkim: DkimConfig | undefined): void;
111
+ declare function signDkimMessage(message: string, dkim: DkimConfig): Promise<string>;
112
+
113
+ declare enum LogLevel {
114
+ DEBUG = 0,
115
+ INFO = 1,
116
+ WARN = 2,
117
+ ERROR = 3,
118
+ NONE = 4
119
+ }
120
+
121
+ type SocketTlsMode = 'off' | 'on' | 'starttls';
122
+ type EdgeSocket = {
123
+ readable: ReadableStream<Uint8Array>;
124
+ writable: WritableStream<Uint8Array>;
125
+ opened?: Promise<unknown>;
126
+ closed?: Promise<void>;
127
+ close(reason?: unknown): Promise<void> | void;
128
+ startTls?(): EdgeSocket | Promise<EdgeSocket>;
129
+ };
130
+ type EdgeSocketConnectOptions = {
131
+ hostname: string;
132
+ port: number;
133
+ tls: SocketTlsMode;
134
+ signal?: AbortSignal;
135
+ };
136
+ type EdgeSocketConnector = {
137
+ connect(options: EdgeSocketConnectOptions): EdgeSocket | Promise<EdgeSocket>;
138
+ };
139
+
140
+ type AuthType = 'plain' | 'login' | 'cram-md5';
141
+ type Credentials = {
142
+ username: string;
143
+ password: string;
144
+ };
145
+ type BatchSendOptions = {
146
+ continueOnError?: boolean;
147
+ };
148
+ type SmtpRejectedRecipient = {
149
+ recipient: string;
150
+ response: string;
151
+ responseCode?: number;
152
+ enhancedStatusCode?: string;
153
+ transient: boolean;
154
+ };
155
+ type SmtpSendReceipt = {
156
+ messageId: string;
157
+ envelope: {
158
+ from: string;
159
+ to: string[];
160
+ };
161
+ accepted: string[];
162
+ rejected: SmtpRejectedRecipient[];
163
+ response: string;
164
+ responseCode?: number;
165
+ enhancedStatusCode?: string;
166
+ size: number;
167
+ };
168
+ type BatchSendResult = PromiseSettledResult<SmtpSendReceipt>[];
169
+ type PipeliningMode = 'auto' | false;
170
+ type SmtpBodyType = '7BIT' | '8BITMIME';
171
+ type SMTPStage = 'connect' | 'greet' | 'ehlo' | 'helo' | 'starttls' | 'auth' | 'mail' | 'rcpt' | 'data' | 'body' | 'rset' | 'quit' | 'send' | 'read';
172
+ type SMTPErrorOptions = {
173
+ stage: SMTPStage;
174
+ command?: string;
175
+ response?: string;
176
+ cause?: unknown;
177
+ };
178
+ declare class SMTPError extends Error {
179
+ readonly stage: SMTPStage;
180
+ readonly command?: string;
181
+ readonly response?: string;
182
+ readonly responseCode?: number;
183
+ readonly enhancedStatusCode?: string;
184
+ readonly transient: boolean;
185
+ readonly cause?: unknown;
186
+ constructor(message: string, options: SMTPErrorOptions);
187
+ }
188
+ type EdgeMailerOptions = {
189
+ host: string;
190
+ port: number;
191
+ secure?: boolean;
192
+ startTls?: boolean;
193
+ credentials?: Credentials;
194
+ authType?: AuthType | AuthType[];
195
+ logLevel?: LogLevel;
196
+ pipelining?: PipeliningMode;
197
+ dsn?: DsnOptions | undefined;
198
+ dkim?: DkimConfig | undefined;
199
+ pool?: SmtpPoolOptions | boolean | undefined;
200
+ socketTimeoutMs?: number;
201
+ responseTimeoutMs?: number;
202
+ };
203
+ type SmtpPoolOptions = {
204
+ maxConnections?: number;
205
+ maxMessagesPerConnection?: number;
206
+ idleTimeoutMs?: number;
207
+ };
208
+ declare class SmtpMailer {
209
+ private readonly connector;
210
+ private readonly host;
211
+ private readonly port;
212
+ private readonly secure;
213
+ private readonly startTls;
214
+ private readonly authType;
215
+ private readonly credentials?;
216
+ private readonly pipelining;
217
+ private readonly socketTimeoutMs;
218
+ private readonly responseTimeoutMs;
219
+ private socket?;
220
+ private reader;
221
+ private writer;
222
+ private responseBuffer;
223
+ private readonly logger;
224
+ private readonly dsn;
225
+ private readonly dkim;
226
+ private active;
227
+ private closeError?;
228
+ private sendChain;
229
+ private emailSending;
230
+ private queuedSendRejects;
231
+ /** SMTP server capabilities **/
232
+ private supportsDSN;
233
+ private supportsSize;
234
+ private maxMessageSize?;
235
+ private supports8BitMime;
236
+ private supportsSmtpUtf8;
237
+ private supportsRequireTls;
238
+ private allowAuth;
239
+ private authTypeSupported;
240
+ private supportsStartTls;
241
+ private supportsPipelining;
242
+ protected constructor(options: EdgeMailerOptions, connector: EdgeSocketConnector, runtimeName?: string);
243
+ send(options: EmailOptions): Promise<SmtpSendReceipt>;
244
+ sendMany(emails: EmailOptions[], options?: BatchSendOptions): Promise<BatchSendResult>;
245
+ close(error?: Error): Promise<void>;
246
+ isActive(): boolean;
247
+ protected initializeSmtpSession(): Promise<void>;
248
+ private sendEmail;
249
+ private canPipeline;
250
+ private prepareEmail;
251
+ private readTimeout;
252
+ private read;
253
+ private shiftResponse;
254
+ private writeLine;
255
+ private write;
256
+ private openSocket;
257
+ private waitForSocketConnected;
258
+ private greet;
259
+ private ehlo;
260
+ private helo;
261
+ private tls;
262
+ private resetCapabilities;
263
+ private parseCapabilities;
264
+ private auth;
265
+ private authWithPlain;
266
+ private authWithLogin;
267
+ private authWithCramMD5;
268
+ private mail;
269
+ private rcpt;
270
+ private data;
271
+ private envelopePipelined;
272
+ private body;
273
+ private createReceipt;
274
+ private rejectedRecipient;
275
+ private responseCode;
276
+ private enhancedStatusCode;
277
+ private rset;
278
+ private mailCommand;
279
+ private rcptCommand;
280
+ private recipients;
281
+ private mailFrom;
282
+ private mailParameters;
283
+ private rcptParameters;
284
+ private notificationParameter;
285
+ private retParameter;
286
+ private hasDsnRequest;
287
+ private needsSmtpUtf8;
288
+ protected abortConnection(error: unknown): Promise<void>;
289
+ private closedSendError;
290
+ private closeSocket;
291
+ private getSocket;
292
+ }
293
+
294
+ declare class SmtpConnectionPool<TMailer extends SmtpMailer> {
295
+ private readonly options;
296
+ private readonly connectMailer;
297
+ private readonly maxConnections;
298
+ private readonly maxMessagesPerConnection;
299
+ private readonly idleTimeoutMs;
300
+ private ready;
301
+ private busy;
302
+ private waitQueue;
303
+ private pendingCreates;
304
+ private pendingDestroys;
305
+ private totalConnections;
306
+ private closed;
307
+ constructor(options: EdgeMailerOptions, connectMailer: (options: EdgeMailerOptions) => Promise<TMailer>);
308
+ send(email: Parameters<TMailer['send']>[0]): Promise<SmtpSendReceipt>;
309
+ sendMany(emails: Parameters<TMailer['send']>[0][], options?: BatchSendOptions): Promise<BatchSendResult>;
310
+ close(): Promise<void>;
311
+ private acquire;
312
+ private release;
313
+ private dispatchWaiters;
314
+ private createBusyClient;
315
+ private createBusyClientInner;
316
+ private trackDestroy;
317
+ private destroy;
318
+ private destroyOnce;
319
+ private waitForDrained;
320
+ private clearIdleTimer;
321
+ }
322
+
323
+ export { type AttachmentDisposition as A, type BatchSendOptions as B, type Credentials as C, type DkimConfig as D, type EdgeMailerOptions as E, LogLevel as L, type MailBodyType as M, type PipeliningMode as P, SMTPError as S, type User as U, type AttachmentEncoding as a, type AuthType as b, type BatchSendResult as c, type DsnOptions as d, type EdgeSocketConnector as e, Email as f, type EmailAttachment as g, type EmailAttachmentContent as h, type EmailOptions as i, type MailEnvelopeOptions as j, type SMTPErrorOptions as k, type SMTPStage as l, type SmtpBodyType as m, SmtpConnectionPool as n, SmtpMailer as o, type SmtpPoolOptions as p, type SmtpRejectedRecipient as q, type SmtpSendReceipt as r, encodeHeader as s, signDkimMessage as t, validateDkimConfig as v };