email

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DomainHasMX

func DomainHasMX(domain string) bool

DomainHasMX checks if domain has MX or A/AAAA records (network call).

func IsValid

func IsValid(s string) bool

IsValid returns true if s is a syntactically valid email address. It uses net/mail to parse and rejects addresses with empty domain or no dot in the domain. It's fast, readable, and avoids brittle regexes.

func RequireVerification

func RequireVerification(c *gin.Context)

WARNING: This must be placed AFTER JwtAccessAuth!

func Send

func Send(e Email) error

Send reads credentials from the environment and sends the email securely

Types

type Email

type Email struct {
	To      string
	Subject string
	Content string
}

Jump to

Keyboard shortcuts

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