util

package
v1.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyEmailExists

func VerifyEmailExists(ctx context.Context, address string) (bool, string)

VerifyEmailExists performs a best-effort SMTP-level verification by connecting to the recipient domain's MX and issuing RCPT TO. Many servers may greylist or disable VRFY/RCPT probes; this returns (false, reason) on any definitive negative (e.g., 550) and on transport errors provides a reason string. It honors the provided context for timeout/cancel.

Why not use gsmail (github.com/gsoultan/gsmail)? - gsmail is for *sending* full MIME emails via *authenticated* SMTP (e.g., Gmail). - This is a *probe* (anonymous MX:25 RCPT check, no auth/body/delivery/spam risk). - Custom: stdlib-only, lightweight (~50 lines), KISS/no bloat.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL