Documentation ¶
Overview ¶
Package service provides core services for verifying an email address.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDisposableEmail ¶ added in v0.2.1
ValidateDisposableEmail validates the email address by checking if the email address is a disposable email address
func ValidateMxRecord ¶ added in v0.2.0
ValidateMxRecord validates the email address by checking if the MX records are present on DNS
func ValidateRegex ¶ added in v0.2.0
ValidateRegex validates the email address using regex
func ValidateSmtpRunning ¶ added in v0.2.0
ValidateSmtpRunning validates the email address by checking if the SMTP server is running
func VerifyEmail ¶
func VerifyEmail(email string, options VerifyEmailOptions) (bool, error)
VerifyEmail verifies if the passed email string argument is a valid email or not. It returns the bool status and any error encountered.
Types ¶
type VerifyEmailOptions ¶ added in v0.2.0
type VerifyEmailOptions struct { ValidateRegex bool // Validates email address using regex ValidateMxRecord bool // Validates MX records are present on DNS ValidateSmtpRunning bool // Validates SMTP server is running ValidateDisposableEmail bool // Validates if the email address is a disposable email address }
VerifyEmailOptions struct to hold VerifyEmail options
Click to show internal directories.
Click to hide internal directories.