utils

package
v0.0.0-...-f3112a3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailSeparator     = '@'
	CONNECTION_TIMEOUT = 1000 * time.Millisecond
)

Variables

View Source
var (
	DefaultDialer = net.Dialer{Timeout: CONNECTION_TIMEOUT}
)

Functions

func MakeSMTPConnection

func MakeSMTPConnection(host string, mx *net.MX, port int) (*smtp.Client, error)

func SplitEmail

func SplitEmail(email string) (account, host string)

pre-validation must be success

func СheckMX

func СheckMX(host string, hostCache *lru.Cache, mt *sync.Mutex) ([]*net.MX, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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