emaildelivery

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 72

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendSMTPEmail

func SendSMTPEmail(settings SMTPSettings, content EmailContent) error

Types

type EmailContent added in v0.7.0

type EmailContent struct {
	Body    string
	IsHtml  bool
	Subject string
	ToEmail string
}

type EmailDeliveryInterface

type EmailDeliveryInterface struct {
	SendEmail *func(input EmailType, userContext supertokens.UserContext) error
}

type EmailType

type EmailType struct {
	EmailVerification *EmailVerificationType
	PasswordReset     *PasswordResetType
	PasswordlessLogin *PasswordlessLoginType
}

type EmailVerificationType

type EmailVerificationType struct {
	User            User
	EmailVerifyLink string
}

type Ingredient

type Ingredient struct {
	IngredientInterfaceImpl EmailDeliveryInterface
}

func MakeIngredient

func MakeIngredient(config TypeInputWithService) Ingredient

type PasswordResetType

type PasswordResetType struct {
	User              User
	PasswordResetLink string
}

type PasswordlessLoginType

type PasswordlessLoginType struct {
	Email            string
	UserInputCode    *string
	UrlWithLinkCode  *string
	CodeLifetime     uint64
	PreAuthSessionId string
}

type SMTPFrom added in v0.7.0

type SMTPFrom struct {
	Name  string
	Email string
}

type SMTPInterface added in v0.7.0

type SMTPInterface struct {
	SendRawEmail *func(input EmailContent, userContext supertokens.UserContext) error
	GetContent   *func(input EmailType, userContext supertokens.UserContext) (EmailContent, error)
}

type SMTPServiceConfig

type SMTPServiceConfig struct {
	Settings SMTPSettings
	Override func(originalImplementation SMTPInterface) SMTPInterface
}

type SMTPSettings added in v0.7.0

type SMTPSettings struct {
	Host     string
	From     SMTPFrom
	Port     int
	Username *string
	Password string
	Secure   bool
}

type TypeInput

type TypeInput struct {
	Service  *EmailDeliveryInterface
	Override func(originalImplementation EmailDeliveryInterface) EmailDeliveryInterface
}

type TypeInputWithService

type TypeInputWithService struct {
	Service  EmailDeliveryInterface
	Override func(originalImplementation EmailDeliveryInterface) EmailDeliveryInterface
}

type User

type User struct {
	ID    string
	Email string
}

Jump to

Keyboard shortcuts

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