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 ¶
ValidateDisposableEmail validates the email address by checking if the email address is a disposable email address
func ValidateMxRecord ¶
ValidateMxRecord validates the email address by checking if the MX records are present on DNS
func ValidateRegex ¶
ValidateRegex validates the email address using regex
func ValidateSmtpRunning ¶
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 ¶
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.