emailcheryp

package module
v0.0.0-...-2952cfb Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

README

  1. This package reference https://github.com/badoux/checkmail
  2. We'll add more functions step by step.

Todo

  1. add ISP-Specific Syntax validation, ISP-specific
  2. add Role Account validation: address that are associated with a specific function or role within an organization, rather than a real person.
  3. Add Disposable Email Address (DEA) validation
  4. Free Email Provider check

Documentation

Overview

Package emailcheryp

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadFormat          = errors.New("invalid format")
	ErrUnresolvableDomain = errors.New("unresolvable domain")
)

Functions

func DialTimeout

func DialTimeout(addr string, timeout time.Duration) (*smtp.Client, error)

DialTimeout returns a new Client connected to an SMTP server at addr. The addr must include a port, as in "mail.example.com:smtp".

func ValidateDomain

func ValidateDomain(email string) error

ValidateDomain validate mail host.

func ValidateFormat

func ValidateFormat(email string) error

func ValidateLocalAndDomain

func ValidateLocalAndDomain(serverHostName, serverMailAddress, email string) error

ValidateLocalAndDomain validate mail host and user. If host is valid, requires valid SMTP [1] serverHostName and serverMailAddress to reverse validation for prevent SPAN and BOTS. [1] https://mxtoolbox.com/SuperTool.aspx

func ValidateMX

func ValidateMX(email string) error

ValidateMX validate if MX record exists for a domain.

Types

type SmtpError

type SmtpError struct {
	Err error
}

func NewSmtpError

func NewSmtpError(err error) SmtpError

func (SmtpError) Code

func (e SmtpError) Code() string

func (SmtpError) Error

func (e SmtpError) Error() string

Jump to

Keyboard shortcuts

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