service

package
v0.0.0-...-acc31bb Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 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

func ValidateDisposableEmail(email string) error

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

func ValidateMxRecord

func ValidateMxRecord(email string) error

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

func ValidateRegex

func ValidateRegex(email string) error

ValidateRegex validates the email address using regex

func ValidateSmtpRunning

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

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