email

package
v0.0.0-...-c86d00c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLoginCodes

func HandleLoginCodes(db *gorm.DB, userId int64) (error, int)

HandleLoginCodes generates a 6 digit code used for email auth and saves it to the database

func HandleRegisterTokens

func HandleRegisterTokens(db *gorm.DB, userId int64) (string, error)

HandleRegisterTokens generates a token for email verification and saves it to the database

func SendChangeEmail

func SendChangeEmail(token string, userEmail string, newEmail string) error

Types

type Email

type Email struct {
	From             *mail.Email
	Subject          string
	To               *mail.Email
	PlainTextContent string
	HTMLContent      string
	Client           *sendgrid.Client
}

Email is the structure accepted by sendgrid to send an email

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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