service

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 5 Imported by: 0

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

func ValidateDisposableEmail(email string) error

ValidateDisposableEmail validates the email address by checking if the email address is a disposable email address

func ValidateMxRecord added in v0.2.0

func ValidateMxRecord(email string) error

ValidateMxRecord validates the email address by checking if the MX records are present on DNS

func ValidateRegex added in v0.2.0

func ValidateRegex(email string) error

ValidateRegex validates the email address using regex

func ValidateSmtpRunning added in v0.2.0

func ValidateSmtpRunning(email string) error

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

Jump to

Keyboard shortcuts

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