qed-mail
Version:
📮 A NodeJS library for checking if an email address exists without sending any email.
26 lines (21 loc) • 394 B
text/typescript
import type { MxRecord } from "dns";
export type SyntaxResult = {
valid: boolean;
username?: string;
domain?: string;
};
export type MxResult = {
valid: boolean;
mxRecords?: MxRecord[];
};
export type SMTPResult = {
valid: boolean;
error?: string;
};
export type Result = {
email: string;
reachable: boolean;
syntax: SyntaxResult;
mx: MxResult;
smtp: SMTPResult;
};