sendgrid

package
v0.0.0-...-2bf3e1d Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LeaseTime = 60 * time.Second

LeaseTime is the duration for which a function execution holds the lease to prevent duplicate emails.

View Source
const Region string = "your-region"

Region is the region where your Cloud Functions are deployed.

Variables

This section is empty.

Functions

func IsEmailAddressFormatValid

func IsEmailAddressFormatValid(emailAddress string) (bool, error)

IsEmailAddressFormatValid checks if a string is a valid RFC 822 email address, with caveats. Returns nil error if valid, and an error with a reason if invalid. RFC 822 is a very old standard. This attempts to cover the core requirements, but is not a perfect implementation. For complete validation, use a dedicated email validation library/package, or a more thorough approach such as parsing the email using the `mail` package and validating parts.

This uses `net/mail.ParseAddress`, which is a more robust base, and then applies a regex and checks length and content.

Types

This section is empty.

Jump to

Keyboard shortcuts

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