mailutil

package
v0.0.0-...-8b05944 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AfricanSmallStatesEducationDomains = map[string][]string{

	"GM": {".edu.gm", ".ac.gm"},
	"GW": {".edu.gw", ".ac.gw"},
	"SL": {".edu.sl", ".ac.sl"},
	"LR": {".edu.lr", ".ac.lr"},
	"CV": {".edu.cv", ".ac.cv"},
	"ST": {".edu.st", ".ac.st"},
	"GQ": {".edu.gq", ".ac.gq"},

	"DJ": {".edu.dj", ".ac.dj"},
	"ER": {".edu.er", ".ac.er"},
	"BI": {".edu.bi", ".ac.bi"},
	"RW": {".edu.rw", ".ac.rw"},
	"SC": {".edu.sc", ".ac.sc"},
	"KM": {".edu.km", ".ac.km"},
	"MU": {".edu.mu", ".ac.mu"},
	"MV": {".edu.mv", ".ac.mv"},

	"SZ": {".edu.sz", ".ac.sz"},
	"LS": {".edu.ls", ".ac.ls"},
	"BW": {".edu.bw", ".ac.bw"},
	"NA": {".edu.na", ".ac.na"},
}
View Source
var AsianSmallStatesEducationDomains = map[string][]string{

	"BN": {".edu.bn", ".ac.bn"},
	"TL": {".edu.tl", ".ac.tl"},

	"BT": {".edu.bt", ".ac.bt"},
	"MV": {".edu.mv", ".ac.mv"},

	"TJ": {".edu.tj", ".ac.tj"},
	"KG": {".edu.kg", ".ac.kg"},
	"TM": {".edu.tm", ".ac.tm"},

	"HK": {".edu.hk", ".ac.hk"},
	"MO": {".edu.mo", ".ac.mo"},
	"TW": {".edu.tw", ".ac.tw"},
}
View Source
var EuropeanSmallStatesEducationDomains = map[string][]string{

	"EE": {".edu.ee", ".ac.ee"},
	"LV": {".edu.lv", ".ac.lv"},
	"LT": {".edu.lt", ".ac.lt"},

	"ME": {".edu.me", ".ac.me"},
	"MK": {".edu.mk", ".ac.mk"},
	"AL": {".edu.al", ".ac.al"},
	"BA": {".edu.ba", ".ac.ba"},
	"XK": {".edu.xk", ".ac.xk"},
	"MD": {".edu.md", ".ac.md"},

	"IS": {".edu.is", ".ac.is"},
	"LU": {".edu.lu", ".ac.lu"},
	"CY": {".edu.cy", ".ac.cy"},
}
View Source
var GlobalEducationDomains = map[string][]string{}/* 242 elements not displayed */

GlobalEducationDomains - 全球教育邮箱域名配置(完整版)

View Source
var MicroStrategyEducationDomains = map[string][]string{

	"VA": {".va"},
	"MC": {".edu.mc", ".ac.mc"},
	"SM": {".edu.sm", ".ac.sm"},
	"AD": {".edu.ad", ".ac.ad"},
	"LI": {".edu.li", ".ac.li"},
	"MT": {".edu.mt", ".ac.mt"},

	"NR": {".edu.nr", ".ac.nr"},
	"TV": {".edu.tv", ".ac.tv"},
	"PW": {".edu.pw", ".ac.pw"},
	"MH": {".edu.mh", ".ac.mh"},
	"FM": {".edu.fm", ".ac.fm"},
	"KI": {".edu.ki", ".ac.ki"},
	"NU": {".edu.nu", ".ac.nu"},
	"CK": {".edu.ck", ".ac.ck"},
	"TK": {".edu.tk", ".ac.tk"},

	"KN": {".edu.kn", ".ac.kn"},
	"LC": {".edu.lc", ".ac.lc"},
	"VC": {".edu.vc", ".ac.vc"},
	"GD": {".edu.gd", ".ac.gd"},
	"AG": {".edu.ag", ".ac.ag"},
	"DM": {".edu.dm", ".ac.dm"},
	"BS": {".edu.bs", ".ac.bs"},
	"BB": {".edu.bb", ".ac.bb"},
	"JM": {".edu.jm", ".ac.jm"},
	"TT": {".edu.tt", ".ac.tt"},
}
View Source
var SpecialTerritoriesEducationDomains = map[string][]string{

	"AI": {".edu.ai", ".ac.ai"},
	"BM": {".edu.bm", ".ac.bm"},
	"VG": {".edu.vg", ".ac.vg"},
	"KY": {".edu.ky", ".ac.ky"},
	"MS": {".edu.ms", ".ac.ms"},
	"TC": {".edu.tc", ".ac.tc"},
	"SH": {".edu.sh", ".ac.sh"},
	"FK": {".edu.fk", ".ac.fk"},
	"GI": {".edu.gi", ".ac.gi"},
	"IO": {".edu.io", ".ac.io"},
	"PN": {".edu.pn", ".ac.pn"},

	"NC": {".edu.nc", ".ac.nc"},
	"PF": {".edu.pf", ".ac.pf"},
	"WF": {".edu.wf", ".ac.wf"},
	"MQ": {".edu.mq", ".ac.mq"},
	"GP": {".edu.gp", ".ac.gp"},
	"GF": {".edu.gf", ".ac.gf"},
	"RE": {".edu.re", ".ac.re"},
	"YT": {".edu.yt", ".ac.yt"},
	"PM": {".edu.pm", ".ac.pm"},
	"TF": {".edu.tf", ".ac.tf"},

	"AS": {".edu.as", ".ac.as"},
	"GU": {".edu.gu", ".ac.gu"},
	"MP": {".edu.mp", ".ac.mp"},
	"PR": {".edu.pr", ".ac.pr"},
	"VI": {".edu.vi", ".ac.vi"},
	"UM": {".edu.um", ".ac.um"},

	"AW": {".edu.aw", ".ac.aw"},
	"CW": {".edu.cw", ".ac.cw"},
	"SX": {".edu.sx", ".ac.sx"},
	"BQ": {".edu.bq", ".ac.bq"},

	"FO": {".edu.fo", ".ac.fo"},
	"GL": {".edu.gl", ".ac.gl"},

	"AC": {".edu.ac", ".ac.ac"},
	"TA": {".edu.ta", ".ac.ta"},
	"CC": {".edu.cc", ".ac.cc"},
	"CX": {".edu.cx", ".ac.cx"},
	"HM": {".edu.hm", ".ac.hm"},
	"NF": {".edu.nf", ".ac.nf"},
}

Functions

func IsMail

func IsMail(email string) bool

Types

type CompleteEmailInfo

type CompleteEmailInfo struct {
	Email       string
	IsEducation bool
	Country     string
	CountryType string // Major Country, Microstate, etc.
	Domain      string
	Institution string
	Suffix      string
}

type EduEmailVerify

type EduEmailVerify struct {
	// contains filtered or unexported fields
}

func NewEduEmailVerify

func NewEduEmailVerify(whiteLiatValid ...func(string) bool) *EduEmailVerify

func (*EduEmailVerify) GetCompleteInfo

func (v *EduEmailVerify) GetCompleteInfo(email string) CompleteEmailInfo

获取完整信息

func (*EduEmailVerify) GetStatistics

func (v *EduEmailVerify) GetStatistics() map[string]int

统计功能

func (*EduEmailVerify) IsEducationEmail

func (v *EduEmailVerify) IsEducationEmail(email string) bool

判断是否为教育邮箱(超级全面版)

type EmailClient

type EmailClient struct {
	*template.MailAdapter
	*EmailConfig
}

func (*EmailClient) Send

func (e *EmailClient) Send(text string) error

type EmailConfig

type EmailConfig struct {
	Identity, Username, Password string
	Host, Port                   string
	TlsConfig                    *tls.Config
	FilterErrors                 []error
}

Jump to

Keyboard shortcuts

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