@visulima/email 1.0.0-alpha.2 → 1.0.0-alpha.21
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/CHANGELOG.md +246 -0
- package/LICENSE.md +536 -899
- package/README.md +36 -21
- package/dist/crypto/index.d.ts +147 -4
- package/dist/crypto/index.js +1 -1
- package/dist/index.d.ts +785 -9
- package/dist/index.js +1 -1
- package/dist/packem_shared/{DkimSigner-pFd4c3fZ.js → DkimSigner-CT2DSHD1.js} +4 -4
- package/dist/packem_shared/Mail-D93oo_9g.js +1 -0
- package/dist/packem_shared/MailMessage-BvaH5tZZ.js +1 -0
- package/dist/packem_shared/{SmimeEncrypter-CBevU534.js → SmimeEncrypter-ZhHEgDwY.js} +2 -2
- package/dist/packem_shared/{SmimeSigner-CObA4jzT.js → SmimeSigner-CYSVF6ez.js} +1 -1
- package/dist/packem_shared/{ahaSendProvider-DlFKEQ6D.js → ahaSendProvider-DOAAW65O.js} +1 -1
- package/dist/packem_shared/{attachment-processor-2rHmfa7j.js → attachment-processor-DsmIomKc.js} +1 -1
- package/dist/packem_shared/{awsSesProvider-Ba-eVJxZ.js → awsSesProvider-DX1630Ms.js} +7 -7
- package/dist/packem_shared/azureProvider-EkNYKAiF.js +1 -0
- package/dist/packem_shared/{brevoProvider-5p6jjiK9.js → brevoProvider-CkR4U4RD.js} +1 -1
- package/dist/packem_shared/build-mime-message-6xstxaUV.js +2 -0
- package/dist/packem_shared/defineProvider-CtLH0VBE.js +1 -0
- package/dist/packem_shared/detectMimeType-bo5oxfnt.js +1 -0
- package/dist/packem_shared/failoverProvider-W5ctAhdC.js +1 -0
- package/dist/packem_shared/httpProvider-DUg1AQfO.js +1 -0
- package/dist/packem_shared/{infobipProvider-CtLwrUaP.js → infobipProvider-BhTsWi7e.js} +1 -1
- package/dist/packem_shared/{mailCrabProvider-CM_CFDca.js → mailCrabProvider-B7H6HwWu.js} +1 -1
- package/dist/packem_shared/mailPaceProvider-DRt6Z9Hr.js +1 -0
- package/dist/packem_shared/{mailerSendProvider-CeeIXFnW.js → mailerSendProvider-Dx_iHInH.js} +1 -1
- package/dist/packem_shared/mailgunProvider-ChkLGZZW.js +1 -0
- package/dist/packem_shared/mailjetProvider-BMRhNe6H.js +1 -0
- package/dist/packem_shared/{mailomatProvider-DMQmjKHT.js → mailomatProvider-CydV-JB6.js} +1 -1
- package/dist/packem_shared/{mailtrapProvider-BN3UBEQw.js → mailtrapProvider-CuAfJWDr.js} +1 -1
- package/dist/packem_shared/{make-request-BDzF9W9D.js → make-request-CaT4d5oC.js} +1 -1
- package/dist/packem_shared/{mandrillProvider-370y7CLu.js → mandrillProvider-BBeLbaw0.js} +1 -1
- package/dist/packem_shared/mockProvider-C0P1lKOy.js +1 -0
- package/dist/packem_shared/{nodemailerProvider-_w8QXMU-.js → nodemailerProvider-DFcvoVFv.js} +1 -1
- package/dist/packem_shared/{opentelemetryProvider-C_ZXOLSd.js → opentelemetryProvider-Dwv88G3O.js} +1 -1
- package/dist/packem_shared/{plunkProvider-DfJumQ4U.js → plunkProvider-BQyjG6YT.js} +1 -1
- package/dist/packem_shared/{postalProvider-Bavx2FcH.js → postalProvider-DPHQ620q.js} +1 -1
- package/dist/packem_shared/{postmarkProvider-DFC0uvjO.js → postmarkProvider-bMTC2gdJ.js} +1 -1
- package/dist/packem_shared/provider.d-DcfYeGJJ.d.ts +28 -0
- package/dist/packem_shared/readFile-BAVMZg5e-C4whBIPd.js +1 -0
- package/dist/packem_shared/resendProvider-Cns1tvF5.js +1 -0
- package/dist/packem_shared/roundRobinProvider-FvZQKl6n.js +1 -0
- package/dist/packem_shared/{scalewayProvider-be1HPimL.js → scalewayProvider-O1dHz7iJ.js} +1 -1
- package/dist/packem_shared/{sendGridProvider-BVI1sq3n.js → sendGridProvider-DmywC-eT.js} +1 -1
- package/dist/packem_shared/{smtpProvider-BV-ufR53.js → smtpProvider-Unjao_fn.js} +8 -8
- package/dist/packem_shared/sweegoProvider-D086G6xG.js +1 -0
- package/dist/packem_shared/types.d-CNnnk-Ya.d.ts +102 -0
- package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +9 -0
- package/dist/packem_shared/types.d-wwpgA3to.d.ts +204 -0
- package/dist/packem_shared/validate-email-options-DPo3SgC0.js +1 -0
- package/dist/packem_shared/zeptomailProvider-DKKEpEsW.js +1 -0
- package/dist/providers/ahasend/index.d.ts +36 -3
- package/dist/providers/ahasend/index.js +1 -1
- package/dist/providers/aws-ses/index.d.ts +47 -3
- package/dist/providers/aws-ses/index.js +1 -1
- package/dist/providers/azure/index.d.ts +52 -3
- package/dist/providers/azure/index.js +1 -1
- package/dist/providers/brevo/index.d.ts +65 -3
- package/dist/providers/brevo/index.js +1 -1
- package/dist/providers/failover/index.d.ts +27 -3
- package/dist/providers/failover/index.js +1 -1
- package/dist/providers/http/index.d.ts +35 -3
- package/dist/providers/http/index.js +1 -1
- package/dist/providers/infobip/index.d.ts +56 -3
- package/dist/providers/infobip/index.js +1 -1
- package/dist/providers/mailcrab/index.d.ts +32 -3
- package/dist/providers/mailcrab/index.js +1 -1
- package/dist/providers/mailersend/index.d.ts +51 -3
- package/dist/providers/mailersend/index.js +1 -1
- package/dist/providers/mailgun/index.d.ts +73 -3
- package/dist/providers/mailgun/index.js +1 -1
- package/dist/providers/mailjet/index.d.ts +72 -3
- package/dist/providers/mailjet/index.js +1 -1
- package/dist/providers/mailomat/index.d.ts +40 -3
- package/dist/providers/mailomat/index.js +1 -1
- package/dist/providers/mailpace/index.d.ts +52 -3
- package/dist/providers/mailpace/index.js +1 -1
- package/dist/providers/mailtrap/index.d.ts +44 -3
- package/dist/providers/mailtrap/index.js +1 -1
- package/dist/providers/mandrill/index.d.ts +87 -3
- package/dist/providers/mandrill/index.js +1 -1
- package/dist/providers/mock/index.d.ts +59 -3
- package/dist/providers/mock/index.js +1 -1
- package/dist/providers/nodemailer/index.d.ts +38 -3
- package/dist/providers/nodemailer/index.js +1 -1
- package/dist/providers/opentelemetry/index.d.ts +529 -3
- package/dist/providers/opentelemetry/index.js +1 -1
- package/dist/providers/plunk/index.d.ts +38 -3
- package/dist/providers/plunk/index.js +1 -1
- package/dist/providers/postal/index.d.ts +48 -3
- package/dist/providers/postal/index.js +1 -1
- package/dist/providers/postmark/index.d.ts +60 -3
- package/dist/providers/postmark/index.js +1 -1
- package/dist/providers/resend/index.d.ts +51 -3
- package/dist/providers/resend/index.js +1 -1
- package/dist/providers/roundrobin/index.d.ts +27 -3
- package/dist/providers/roundrobin/index.js +1 -1
- package/dist/providers/scaleway/index.d.ts +44 -3
- package/dist/providers/scaleway/index.js +1 -1
- package/dist/providers/sendgrid/index.d.ts +84 -3
- package/dist/providers/sendgrid/index.js +1 -1
- package/dist/providers/smtp/index.d.ts +71 -3
- package/dist/providers/smtp/index.js +1 -1
- package/dist/providers/sweego/index.d.ts +40 -3
- package/dist/providers/sweego/index.js +1 -1
- package/dist/providers/zeptomail/index.d.ts +37 -3
- package/dist/providers/zeptomail/index.js +1 -1
- package/dist/template-engines/handlebars.d.ts +23 -22
- package/dist/template-engines/handlebars.js +1 -1
- package/dist/template-engines/html-to-text.d.ts +24 -24
- package/dist/template-engines/mjml.d.ts +10 -10
- package/dist/template-engines/react-email.d.ts +9 -9
- package/dist/template-engines/vue-email.d.ts +9 -9
- package/dist/utils/cache.d.ts +49 -48
- package/dist/utils/format-email-address.d.ts +8 -7
- package/dist/utils/normalize-email-aliases.d.ts +20 -20
- package/dist/utils/parse-address.d.ts +18 -17
- package/dist/utils/parse-address.js +1 -1
- package/dist/utils/validation/check-mx-records.d.ts +36 -35
- package/dist/utils/validation/disposable-email-domains.d.ts +1 -13
- package/dist/utils/validation/role-accounts.d.ts +18 -18
- package/dist/utils/validation/validate-email.d.ts +5 -5
- package/dist/utils/validation/verify-email.d.ts +45 -42
- package/dist/utils/validation/verify-email.js +1 -1
- package/dist/utils/validation/verify-smtp.d.ts +35 -34
- package/dist/utils/validation/verify-smtp.js +1 -1
- package/package.json +61 -61
- package/dist/attachment-helpers.d.ts +0 -64
- package/dist/crypto/dkim-signer.d.ts +0 -48
- package/dist/crypto/smime-encrypter.d.ts +0 -53
- package/dist/crypto/smime-signer.d.ts +0 -48
- package/dist/crypto/types.d.ts +0 -101
- package/dist/draft-mail-message.d.ts +0 -13
- package/dist/errors/email-error.d.ts +0 -17
- package/dist/errors/required-option-error.d.ts +0 -10
- package/dist/mail-message.d.ts +0 -425
- package/dist/mail.d.ts +0 -206
- package/dist/packem_shared/Mail-6Bltpy_p.js +0 -1
- package/dist/packem_shared/MailMessage-B76GPBBA.js +0 -1
- package/dist/packem_shared/azureProvider-CQYAkgVF.js +0 -1
- package/dist/packem_shared/build-mime-message-IYaUqqPJ.js +0 -2
- package/dist/packem_shared/defineProvider-B9rSklAJ.js +0 -1
- package/dist/packem_shared/detectMimeType-S8WRsNtY.js +0 -1
- package/dist/packem_shared/failoverProvider-CAHQQueo.js +0 -1
- package/dist/packem_shared/httpProvider-CZD6LZX3.js +0 -1
- package/dist/packem_shared/mailPaceProvider-B6yKvh6z.js +0 -1
- package/dist/packem_shared/mailgunProvider-mmjKzouh.js +0 -1
- package/dist/packem_shared/mailjetProvider-DwN6i0VA.js +0 -1
- package/dist/packem_shared/mockProvider-DN5ZwutD.js +0 -1
- package/dist/packem_shared/readFile-BlZxbhCU-C8bCdiA2.js +0 -1
- package/dist/packem_shared/resendProvider-CfqU7UdE.js +0 -1
- package/dist/packem_shared/roundRobinProvider-1WQnuKR8.js +0 -1
- package/dist/packem_shared/sweegoProvider-7419CSAq.js +0 -1
- package/dist/packem_shared/validate-email-options-DfJ7llf8.js +0 -1
- package/dist/packem_shared/zeptomailProvider-C2lh0Xmo.js +0 -1
- package/dist/providers/ahasend/provider.d.ts +0 -7
- package/dist/providers/ahasend/types.d.ts +0 -28
- package/dist/providers/aws-ses/provider.d.ts +0 -8
- package/dist/providers/aws-ses/types.d.ts +0 -38
- package/dist/providers/azure/provider.d.ts +0 -7
- package/dist/providers/azure/types.d.ts +0 -44
- package/dist/providers/brevo/provider.d.ts +0 -7
- package/dist/providers/brevo/types.d.ts +0 -57
- package/dist/providers/failover/provider.d.ts +0 -7
- package/dist/providers/failover/types.d.ts +0 -19
- package/dist/providers/http/provider.d.ts +0 -7
- package/dist/providers/http/types.d.ts +0 -27
- package/dist/providers/infobip/provider.d.ts +0 -7
- package/dist/providers/infobip/types.d.ts +0 -48
- package/dist/providers/mailcrab/provider.d.ts +0 -9
- package/dist/providers/mailcrab/types.d.ts +0 -22
- package/dist/providers/mailersend/provider.d.ts +0 -7
- package/dist/providers/mailersend/types.d.ts +0 -43
- package/dist/providers/mailgun/provider.d.ts +0 -7
- package/dist/providers/mailgun/types.d.ts +0 -65
- package/dist/providers/mailjet/provider.d.ts +0 -7
- package/dist/providers/mailjet/types.d.ts +0 -64
- package/dist/providers/mailomat/provider.d.ts +0 -7
- package/dist/providers/mailomat/types.d.ts +0 -32
- package/dist/providers/mailpace/provider.d.ts +0 -7
- package/dist/providers/mailpace/types.d.ts +0 -44
- package/dist/providers/mailtrap/provider.d.ts +0 -7
- package/dist/providers/mailtrap/types.d.ts +0 -36
- package/dist/providers/mandrill/provider.d.ts +0 -7
- package/dist/providers/mandrill/types.d.ts +0 -79
- package/dist/providers/mock/provider.d.ts +0 -8
- package/dist/providers/mock/types.d.ts +0 -50
- package/dist/providers/nodemailer/provider.d.ts +0 -7
- package/dist/providers/nodemailer/types.d.ts +0 -30
- package/dist/providers/opentelemetry/provider.d.ts +0 -8
- package/dist/providers/opentelemetry/types.d.ts +0 -31
- package/dist/providers/plunk/provider.d.ts +0 -7
- package/dist/providers/plunk/types.d.ts +0 -30
- package/dist/providers/postal/provider.d.ts +0 -7
- package/dist/providers/postal/types.d.ts +0 -40
- package/dist/providers/postmark/provider.d.ts +0 -7
- package/dist/providers/postmark/types.d.ts +0 -52
- package/dist/providers/provider.d.ts +0 -27
- package/dist/providers/resend/provider.d.ts +0 -7
- package/dist/providers/resend/types.d.ts +0 -43
- package/dist/providers/roundrobin/provider.d.ts +0 -7
- package/dist/providers/roundrobin/types.d.ts +0 -19
- package/dist/providers/scaleway/provider.d.ts +0 -7
- package/dist/providers/scaleway/types.d.ts +0 -36
- package/dist/providers/sendgrid/provider.d.ts +0 -7
- package/dist/providers/sendgrid/types.d.ts +0 -76
- package/dist/providers/smtp/provider.d.ts +0 -7
- package/dist/providers/smtp/types.d.ts +0 -63
- package/dist/providers/sweego/provider.d.ts +0 -7
- package/dist/providers/sweego/types.d.ts +0 -32
- package/dist/providers/utils/address-formatter.d.ts +0 -139
- package/dist/providers/utils/attachment-processor.d.ts +0 -58
- package/dist/providers/utils/index.d.ts +0 -4
- package/dist/providers/utils/payload-builder.d.ts +0 -78
- package/dist/providers/utils/provider-base.d.ts +0 -69
- package/dist/providers/zeptomail/provider.d.ts +0 -7
- package/dist/providers/zeptomail/types.d.ts +0 -29
- package/dist/template-engines/types.d.ts +0 -8
- package/dist/types.d.ts +0 -203
- package/dist/utils/build-mime-message.d.ts +0 -8
- package/dist/utils/create-logger.d.ts +0 -16
- package/dist/utils/format-email-addresses.d.ts +0 -8
- package/dist/utils/generate-boundary.d.ts +0 -7
- package/dist/utils/generate-message-id.d.ts +0 -6
- package/dist/utils/headers-to-record.d.ts +0 -9
- package/dist/utils/is-port-available.d.ts +0 -9
- package/dist/utils/make-request.d.ts +0 -18
- package/dist/utils/retry.d.ts +0 -10
- package/dist/utils/sanitize-header.d.ts +0 -14
- package/dist/utils/to-base64.d.ts +0 -8
- package/dist/utils/validation/validate-email-options.d.ts +0 -8
package/dist/utils/cache.d.ts
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
* Generic cache interface for caching any type of data.
|
|
3
|
+
* Implementations can use in-memory cache, LRU cache, Redis, etc.
|
|
4
|
+
*/
|
|
5
|
+
interface Cache<T = unknown> {
|
|
6
|
+
/**
|
|
7
|
+
* Clears all cached entries.
|
|
8
|
+
*/
|
|
9
|
+
clear: () => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Deletes a cached entry.
|
|
12
|
+
* @param key The cache key.
|
|
13
|
+
*/
|
|
14
|
+
delete: (key: string) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets a cached value.
|
|
17
|
+
* @param key The cache key.
|
|
18
|
+
* @returns The cached value or undefined if not found or expired.
|
|
19
|
+
*/
|
|
20
|
+
get: (key: string) => Promise<T | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Sets a cached value.
|
|
23
|
+
* @param key The cache key.
|
|
24
|
+
* @param value The value to cache.
|
|
25
|
+
* @param ttl Time-to-live in milliseconds.
|
|
26
|
+
*/
|
|
27
|
+
set: (key: string, value: T, ttl: number) => Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
* Options for creating an in-memory cache.
|
|
31
|
+
*/
|
|
32
|
+
interface InMemoryCacheOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Maximum number of entries in the cache.
|
|
35
|
+
* @default 500
|
|
36
|
+
*/
|
|
37
|
+
max?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Default TTL in milliseconds for entries.
|
|
40
|
+
* @default 3600000 (1 hour)
|
|
41
|
+
*/
|
|
42
|
+
ttl?: number;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
* Default in-memory cache implementation using LRU cache.
|
|
46
|
+
*/
|
|
47
|
+
declare class InMemoryCache<T extends object = Record<string, unknown>> implements Cache<T> {
|
|
48
|
+
private readonly cache;
|
|
49
|
+
constructor(options?: InMemoryCacheOptions);
|
|
50
|
+
clear: () => Promise<void>;
|
|
51
|
+
delete: (key: string) => Promise<void>;
|
|
52
|
+
get: (key: string) => Promise<T | undefined>;
|
|
53
|
+
set: (key: string, value: T, ttl: number) => Promise<void>;
|
|
54
54
|
}
|
|
55
|
+
export { Cache, InMemoryCache, InMemoryCacheOptions };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as EmailAddress } from "../packem_shared/types.d-wwpgA3to.js";
|
|
2
|
+
import 'node:buffer';
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
* Formats an email address as "Name <email@example.com>" or just "email@example.com" if no name is provided.
|
|
5
|
+
* @param address The email address object to format.
|
|
6
|
+
* @returns The formatted email address string in RFC 5322 format.
|
|
7
|
+
* @throws {EmailError} When the email address is invalid.
|
|
8
|
+
*/
|
|
8
9
|
declare const formatEmailAddress: (address: EmailAddress) => string;
|
|
9
|
-
export default
|
|
10
|
+
export { formatEmailAddress as default };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
* Normalizes email aliases for supported email providers.
|
|
3
|
+
* For example: example@gmail.com and example+another@gmail.com point to the same email address.
|
|
4
|
+
* This function normalizes aliases to their canonical form.
|
|
5
|
+
*
|
|
6
|
+
* Supported providers:
|
|
7
|
+
* - Gmail: Removes dots and plus aliases (example+test@gmail.com → example@gmail.com)
|
|
8
|
+
* - Yahoo, Outlook, Hotmail, Live, MSN, iCloud, ProtonMail, Zoho, FastMail, Mail.com, GMX: Removes plus aliases only
|
|
9
|
+
* @param email The email address to normalize.
|
|
10
|
+
* @returns The normalized email address, or the original email if not supported or invalid.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { normalizeEmailAliases } from "@visulima/email/utils/normalize-email-aliases";
|
|
14
|
+
*
|
|
15
|
+
* normalizeEmailAliases("example+test@gmail.com"); // "example@gmail.com"
|
|
16
|
+
* normalizeEmailAliases("ex.ample@gmail.com"); // "example@gmail.com"
|
|
17
|
+
* normalizeEmailAliases("user+tag@yahoo.com"); // "user@yahoo.com"
|
|
18
|
+
* normalizeEmailAliases("user@example.com"); // "user@example.com" (unchanged)
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
21
|
declare const normalizeEmailAliases: (email: string) => string;
|
|
22
|
-
export default
|
|
22
|
+
export { normalizeEmailAliases as default };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as EmailAddress } from "../packem_shared/types.d-wwpgA3to.js";
|
|
2
|
+
import 'node:buffer';
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
* Parses a string representation of an email address into an EmailAddress object.
|
|
5
|
+
* Supports formats: "email@example.com", "Name <email@example.com>", "<email@example.com>".
|
|
6
|
+
* @example Parsing an address with a name
|
|
7
|
+
* ```ts
|
|
8
|
+
* const address = parseAddress("John Doe <john@example.com>");
|
|
9
|
+
* // { name: "John Doe", email: "john@example.com" }
|
|
10
|
+
* ```
|
|
11
|
+
* @example Parsing an address without a name
|
|
12
|
+
* ```ts
|
|
13
|
+
* const address = parseAddress("jane@example.com");
|
|
14
|
+
* // { email: "jane@example.com" }
|
|
15
|
+
* ```
|
|
16
|
+
* @param address The string representation of the address to parse.
|
|
17
|
+
* @returns An EmailAddress object if parsing is successful, or undefined if invalid.
|
|
18
|
+
*/
|
|
18
19
|
declare const parseAddress: (address: string) => EmailAddress | undefined;
|
|
19
|
-
export default
|
|
20
|
+
export { parseAddress as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var m=Object.defineProperty;var o=(t,e)=>m(t,"name",{value:e,configurable:!0});import d from"./validation/validate-email.js";var h=Object.defineProperty,c=o((t,e)=>h(t,"name",{value:e,configurable:!0}),"l");const g=c(t=>{const e=t.replace(/^"(.+)"$/,"$1");return!(!e||e.length===0||e.includes("..")||e.startsWith(".")||e.endsWith("."))},"isValidLocalPart"),a=c(t=>{const e=t.indexOf("@[");if(e>0&&t.endsWith("]")){const n=t.length-1,l=t.slice(e+2,n);if(l.includes("@["))return!1;const i=t.slice(0,e),s=l;return!s||s.trim().length===0||s.includes("]")?!1:i?g(i):!1}if(t.includes("@[")&&!t.includes("]"))return!1;const r=t.match(/^"((?:[^"\\]|\\.)+)"@(.+)$/);if(r
|
|
1
|
+
var m=Object.defineProperty;var o=(t,e)=>m(t,"name",{value:e,configurable:!0});import d from"./validation/validate-email.js";var h=Object.defineProperty,c=o((t,e)=>h(t,"name",{value:e,configurable:!0}),"l");const g=c(t=>{const e=t.replace(/^"(.+)"$/,"$1");return!(!e||e.length===0||e.includes("..")||e.startsWith(".")||e.endsWith("."))},"isValidLocalPart"),a=c(t=>{const e=t.indexOf("@[");if(e>0&&t.endsWith("]")){const n=t.length-1,l=t.slice(e+2,n);if(l.includes("@["))return!1;const i=t.slice(0,e),s=l;return!s||s.trim().length===0||s.includes("]")?!1:i?g(i):!1}if(t.includes("@[")&&!t.includes("]"))return!1;const r=t.match(/^"((?:[^"\\]|\\.)+)"@(.+)$/);if(r?.[2]){const n=r[2];return n.startsWith("[")?!1:d(`test@${n}`)}return d(t)},"isValidEmailFormat"),$=c(t=>{if(!t||typeof t!="string")return;const e=t.trim();if(!e)return;const r=e.lastIndexOf("<"),n=e.lastIndexOf(">");if(r!==-1&&n>r){const i=e.slice(0,r).trim(),s=e.slice(r+1,n).trim();if(s&&a(s)){if(i){const f=i.replace(/^"(.+)"$/,"$1");return{email:s,name:f}}return{email:s}}}const l=e.match(/^<([^>]+)>$/);if(l?.[1]){const i=l[1].trim();return a(i)?{email:i}:void 0}if(!(e.includes("]")&&!e.includes("@["))&&!(e.includes('"')&&!e.startsWith('"')&&e.indexOf('"')<e.indexOf("@"))){if(e.startsWith('"')){let i=1,s=!1;for(;i<e.length;)if(e[i]==="\\"&&i+1<e.length)i+=2;else if(e[i]==='"'){if(i+1<e.length&&e[i+1]==="@"){s=!0;break}i+=1}else i+=1;if(!s&&e.includes("@")){const f=e.indexOf("@"),u=e.slice(1).indexOf('"');if(u===-1||f<u+1)return}}if(a(e))return{email:e}}},"parseAddress");export{$ as default};
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
1
|
+
import { Cache } from "../cache.js";
|
|
2
|
+
export { type InMemoryCache } from "../cache.js";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
* MX record information.
|
|
5
|
+
*/
|
|
6
|
+
interface MxRecord {
|
|
7
|
+
exchange: string;
|
|
8
|
+
priority: number;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
* Result of MX record check.
|
|
12
|
+
*/
|
|
13
|
+
interface MxCheckResult {
|
|
14
|
+
error?: string;
|
|
15
|
+
records?: MxRecord[];
|
|
16
|
+
valid: boolean;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
* Options for MX record checking.
|
|
20
|
+
*/
|
|
21
|
+
interface MxCheckOptions {
|
|
22
|
+
cache?: Cache<MxCheckResult>;
|
|
23
|
+
ttl?: number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
* Checks MX records for a domain.
|
|
27
|
+
* @param domain The domain to check MX records for.
|
|
28
|
+
* @param options Options for MX record checking, including caching.
|
|
29
|
+
* @returns Result containing MX records or error.
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { checkMxRecords } from "@visulima/email/validation/check-mx-records";
|
|
33
|
+
* import { InMemoryCache } from "@visulima/email/utils/cache";
|
|
34
|
+
*
|
|
35
|
+
* const cache = new InMemoryCache();
|
|
36
|
+
* const result = await checkMxRecords("example.com", { cache });
|
|
37
|
+
* if (result.valid) {
|
|
38
|
+
* console.log("MX records:", result.records);
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare const checkMxRecords: (domain: string, options?: MxCheckOptions) => Promise<MxCheckResult>;
|
|
43
|
+
export { type Cache, MxCheckOptions, MxCheckResult, MxRecord, checkMxRecords };
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Re-exports all functionality from @visulima/disposable-email-domains.
|
|
3
|
-
* This provides access to disposable email domain checking utilities.
|
|
4
|
-
* @example
|
|
5
|
-
* ```ts
|
|
6
|
-
* import { isDisposableEmail, isDisposableDomain, getDomainList } from "\@visulima/email/validation/disposable-email-domains";
|
|
7
|
-
*
|
|
8
|
-
* if (isDisposableEmail("user@mailinator.com")) {
|
|
9
|
-
* console.log("Disposable email detected!");
|
|
10
|
-
* }
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export * from "@visulima/disposable-email-domains";
|
|
1
|
+
export * from '@visulima/disposable-email-domains';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* Common role account prefixes that indicate non-personal email addresses.
|
|
3
|
+
* Includes RFC 2142 standard role accounts and common business/operational prefixes.
|
|
4
|
+
*/
|
|
5
5
|
declare const ROLE_ACCOUNT_PREFIXES: Set<string>;
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export { ROLE_ACCOUNT_PREFIXES };
|
|
7
|
+
* Checks if an email address is a role account (non-personal).
|
|
8
|
+
* @param email The email address to check.
|
|
9
|
+
* @param customPrefixes Optional set of additional role account prefixes.
|
|
10
|
+
* @returns True if the email is a role account, false otherwise.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { isRoleAccount } from "@visulima/email/validation/role-accounts";
|
|
14
|
+
*
|
|
15
|
+
* if (isRoleAccount("noreply@example.com")) {
|
|
16
|
+
* console.log("This is a role account");
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const isRoleAccount: (email: string, customPrefixes?: Set<string>) => boolean;
|
|
21
|
+
export { ROLE_ACCOUNT_PREFIXES, isRoleAccount };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
* Validates an email address format according to basic RFC standards.
|
|
3
|
+
* @param email The email address string to validate.
|
|
4
|
+
* @returns True if the email address is valid, false otherwise.
|
|
5
|
+
*/
|
|
6
6
|
declare const validateEmail: (email: string) => boolean;
|
|
7
|
-
export default
|
|
7
|
+
export { validateEmail as default };
|
|
@@ -1,47 +1,50 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SmtpVerificationOptions } from "./verify-smtp.js";
|
|
2
|
+
import "../cache.js";
|
|
3
|
+
import "./check-mx-records.js";
|
|
2
4
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
* Options for comprehensive email verification.
|
|
6
|
+
*/
|
|
7
|
+
interface EmailVerificationOptions extends SmtpVerificationOptions {
|
|
8
|
+
checkDisposable?: boolean;
|
|
9
|
+
checkMx?: boolean;
|
|
10
|
+
checkRoleAccount?: boolean;
|
|
11
|
+
checkSmtp?: boolean;
|
|
12
|
+
customDisposableDomains?: Set<string>;
|
|
13
|
+
customRolePrefixes?: Set<string>;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
* Result of comprehensive email verification.
|
|
17
|
+
*/
|
|
18
|
+
interface EmailVerificationResult {
|
|
19
|
+
disposable?: boolean;
|
|
20
|
+
errors: string[];
|
|
21
|
+
formatValid: boolean;
|
|
22
|
+
mxValid?: boolean;
|
|
23
|
+
roleAccount?: boolean;
|
|
24
|
+
smtpValid?: boolean;
|
|
25
|
+
valid: boolean;
|
|
26
|
+
warnings: string[];
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
29
|
+
* Comprehensive email verification combining multiple checks.
|
|
30
|
+
* @param email The email address to verify.
|
|
31
|
+
* @param options Verification options.
|
|
32
|
+
* @returns Detailed verification result.
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* import { verifyEmail } from "@visulima/email/validation/verify-email";
|
|
36
|
+
*
|
|
37
|
+
* const result = await verifyEmail("user@example.com", {
|
|
38
|
+
* checkDisposable: true,
|
|
39
|
+
* checkRoleAccount: true,
|
|
40
|
+
* checkMx: true,
|
|
41
|
+
* checkSmtp: false
|
|
42
|
+
* });
|
|
43
|
+
*
|
|
44
|
+
* if (result.valid) {
|
|
45
|
+
* console.log("Email is valid!");
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare const verifyEmail: (email: string, options?: EmailVerificationOptions) => Promise<EmailVerificationResult>;
|
|
50
|
+
export { EmailVerificationOptions, EmailVerificationResult, verifyEmail };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var V=Object.defineProperty;var f=(e,r)=>V(e,"name",{value:r,configurable:!0});import{checkMxRecords as y}from"./check-mx-records.js";import{isRoleAccount as k}from"./role-accounts.js";import w from"./validate-email.js";import{verifySmtp as E}from"./verify-smtp.js";import{isDisposableEmail as A}from"@visulima/disposable-email-domains";var D=Object.defineProperty,M=f((e,r)=>D(e,"name",{value:r,configurable:!0}),"f");const N=M(async(e,r={})=>{const{checkDisposable:p=!0,checkMx:d=!0,checkRoleAccount:u=!0,checkSmtp:h=!1,customDisposableDomains:v,customRolePrefixes:b,...g}=r,c=w(e),a=[],i=[];if(!c)return a.push("Invalid email format"),{errors:a,formatValid:!1,valid:!1,warnings:i};let s,l,m,n;if(p)try{s=A(e,v),s&&i.push("Email is from a disposable email service")}catch{}if(u&&(l=k(e,b),l&&i.push("Email appears to be a role account (non-personal)")),d){const o=e.split("@")[1];if(!o)return a.push("Invalid email format: missing domain"),{disposable:s,errors:a,formatValid:!1,mxValid:!1,roleAccount:l,valid:!1,warnings:i};const t=await y(o,{cache:r.cache});m=t.valid,t.valid||a.push(t.error
|
|
1
|
+
var V=Object.defineProperty;var f=(e,r)=>V(e,"name",{value:r,configurable:!0});import{checkMxRecords as y}from"./check-mx-records.js";import{isRoleAccount as k}from"./role-accounts.js";import w from"./validate-email.js";import{verifySmtp as E}from"./verify-smtp.js";import{isDisposableEmail as A}from"@visulima/disposable-email-domains";var D=Object.defineProperty,M=f((e,r)=>D(e,"name",{value:r,configurable:!0}),"f");const N=M(async(e,r={})=>{const{checkDisposable:p=!0,checkMx:d=!0,checkRoleAccount:u=!0,checkSmtp:h=!1,customDisposableDomains:v,customRolePrefixes:b,...g}=r,c=w(e),a=[],i=[];if(!c)return a.push("Invalid email format"),{errors:a,formatValid:!1,valid:!1,warnings:i};let s,l,m,n;if(p)try{s=A(e,v),s&&i.push("Email is from a disposable email service")}catch{}if(u&&(l=k(e,b),l&&i.push("Email appears to be a role account (non-personal)")),d){const o=e.split("@")[1];if(!o)return a.push("Invalid email format: missing domain"),{disposable:s,errors:a,formatValid:!1,mxValid:!1,roleAccount:l,valid:!1,warnings:i};const t=await y(o,{cache:r.cache});m=t.valid,t.valid||a.push(t.error??"No valid MX records found")}if(h){const o=await E(e,{...g,cache:r.cache,smtpCache:r.smtpCache});n=o.valid,!o.valid&&o.error&&a.push(`SMTP verification failed: ${o.error}`)}const x=c&&a.length===0;return{disposable:s,errors:a,formatValid:c,mxValid:m,roleAccount:l,smtpValid:n,valid:x,warnings:i}},"verifyEmail");export{N as verifyEmail};
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Cache } from "../cache.js";
|
|
2
|
+
import { MxCheckResult, MxRecord } from "./check-mx-records.js";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
* Options for SMTP verification.
|
|
5
|
+
*/
|
|
6
|
+
interface SmtpVerificationOptions {
|
|
7
|
+
cache?: Cache<MxCheckResult>;
|
|
8
|
+
fromEmail?: string;
|
|
9
|
+
port?: number;
|
|
10
|
+
smtpCache?: Cache<SmtpVerificationResult>;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
ttl?: number;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
* Detailed result of SMTP verification attempt.
|
|
16
|
+
*/
|
|
17
|
+
interface SmtpVerificationResult {
|
|
18
|
+
error?: string;
|
|
19
|
+
mxRecords?: MxRecord[];
|
|
20
|
+
smtpResponse?: string;
|
|
21
|
+
valid: boolean;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
* Verifies an email address by checking MX records and attempting SMTP verification.
|
|
25
|
+
* Note: Many mail servers block SMTP verification to prevent email harvesting.
|
|
26
|
+
* @param email The email address to verify.
|
|
27
|
+
* @param options Verification options.
|
|
28
|
+
* @returns Result containing verification status.
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { verifySmtp } from "@visulima/email/validation/verify-smtp";
|
|
32
|
+
*
|
|
33
|
+
* const result = await verifySmtp("user@example.com", {
|
|
34
|
+
* timeout: 5000,
|
|
35
|
+
* fromEmail: "test@example.com"
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare const verifySmtp: (email: string, options?: SmtpVerificationOptions) => Promise<SmtpVerificationResult>;
|
|
40
|
+
export { SmtpVerificationOptions, SmtpVerificationResult, verifySmtp };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var R=(t,e)=>j(t,"name",{value:e,configurable:!0});import{createRequire as S}from"node:module";import{checkMxRecords as C}from"./check-mx-records.js";const $=S(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,O=R(t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,d]=u.versions.node.split(".").map(Number);if(e>22||e===22&&d>=3||e===20&&d>=16)return u.getBuiltinModule(t)}return $(t)},"__cjs_getBuiltinModule"),{Socket:P}=O("node:net");var E=Object.defineProperty,p=R((t,e)=>E(t,"name",{value:e,configurable:!0}),"n");const A=p(async(t,e={})=>{const{fromEmail:d="test@example.com",port:x=25,timeout:M=5e3,ttl:_=36e5}=e;if(!t||typeof t!="string")return{error:"Invalid email address",valid:!1};const l=t.toLowerCase().trim(),h=l.indexOf("@");if(h===-1||h===l.length-1)return{error:"Invalid email format",valid:!1};const{smtpCache:c}=e,g=`smtp:${l}:${d}:${x}`;if(c){const n=await c.get(g);if(n!==void 0)return n}const w=l.slice(h+1),W=e.cache,r=await C(w,{cache:W});if(!r.valid||!r.records||r.records.length===0){const n={error:r.error
|
|
1
|
+
var j=Object.defineProperty;var R=(t,e)=>j(t,"name",{value:e,configurable:!0});import{createRequire as S}from"node:module";import{checkMxRecords as C}from"./check-mx-records.js";const $=S(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,O=R(t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,d]=u.versions.node.split(".").map(Number);if(e>22||e===22&&d>=3||e===20&&d>=16)return u.getBuiltinModule(t)}return $(t)},"__cjs_getBuiltinModule"),{Socket:P}=O("node:net");var E=Object.defineProperty,p=R((t,e)=>E(t,"name",{value:e,configurable:!0}),"n");const A=p(async(t,e={})=>{const{fromEmail:d="test@example.com",port:x=25,timeout:M=5e3,ttl:_=36e5}=e;if(!t||typeof t!="string")return{error:"Invalid email address",valid:!1};const l=t.toLowerCase().trim(),h=l.indexOf("@");if(h===-1||h===l.length-1)return{error:"Invalid email format",valid:!1};const{smtpCache:c}=e,g=`smtp:${l}:${d}:${x}`;if(c){const n=await c.get(g);if(n!==void 0)return n}const w=l.slice(h+1),W=e.cache,r=await C(w,{cache:W});if(!r.valid||!r.records||r.records.length===0){const n={error:r.error??"No MX records found",mxRecords:r.records,valid:!1};return c&&await c.set(g,n,_),n}const y=r.records[0];return new Promise(n=>{const o=new P;let v="",s="connected";const m=p(()=>{o.removeAllListeners(),o.destroy()},"cleanup"),f=p(a=>{c&&c.set(g,a,_).catch(()=>{}),n(a)},"cacheAndResolve"),T=p(a=>{m(),f({error:a.message,mxRecords:r.records,valid:!1})},"onError"),b=p(()=>{m(),f({error:"SMTP connection timeout",mxRecords:r.records,valid:!1})},"onTimeout");o.setTimeout(M),o.on("error",T),o.on("timeout",b),o.on("data",a=>{v+=a.toString();const i=v.slice(-3);s==="connected"&&(i.startsWith("220")||i.startsWith("250"))?(s="helo",o.write(`HELO ${w}\r
|
|
2
2
|
`)):s==="helo"&&i.startsWith("250")?(s="mail-from",o.write(`MAIL FROM:<${d}>\r
|
|
3
3
|
`)):s==="mail-from"&&i.startsWith("250")?(s="rcpt-to",o.write(`RCPT TO:<${l}>\r
|
|
4
4
|
`)):s==="rcpt-to"&&i.startsWith("250")?(m(),f({mxRecords:r.records,smtpResponse:v,valid:!0})):s==="rcpt-to"&&(i.startsWith("550")||i.startsWith("551")||i.startsWith("553"))&&(m(),f({error:"Email address does not exist",mxRecords:r.records,smtpResponse:v,valid:!1}))}),y?o.connect(x,y.exchange):(m(),f({error:"No MX record available",mxRecords:r.records,valid:!1}))})},"verifySmtp");export{A as verifySmtp};
|