mailutil

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailFull                string = `^(?i)([^\@]+)\@([^\@]+\.[a-z]+)+$`
	EmailFullNumeric         string = `(?i)^([0-9]+|test)\@[0-9]+\.[a-z]+$`
	EmailDomainExampleOrTest string = `(?i)[\@.](example|test)\.[a-z]+$`
	DomainSingleCharValid    string = `(?i)^([qxz]\.com|[iq]\.net|[cvwx]\.org|)$`
)

Variables

This section is empty.

Functions

func AddressIsValidFull

func AddressIsValidFull(address string) (bool, string, string)

func AddressIsValidFullFuzzy

func AddressIsValidFullFuzzy(address string, excludeExampleOrTest bool, excludeNumericTestAddress bool) bool

func DomainIsExampleOrTest

func DomainIsExampleOrTest(address string) bool

func DomainIsValidSingleChar

func DomainIsValidSingleChar(domain string) bool

func HostnameIsValid

func HostnameIsValid(hostname string) bool

func ParseAddressSpec

func ParseAddressSpec(addrSpec string) (string, string, error)

ParseAddressSpec parses RFC 5322 Addr-Spec Specification

Types

type MailAddress

type MailAddress struct {
	SMTPUser string
	SMTPHost string
	Address  *mail.Address
}

func ParseAddress

func ParseAddress(address string) (MailAddress, error)

Jump to

Keyboard shortcuts

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