emaildelivery

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 53

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
	TenantId        string
}

type Ingredient

type Ingredient struct {
	IngredientInterfaceImpl EmailDeliveryInterface
}

func MakeIngredient

func MakeIngredient(config TypeInputWithService) Ingredient

type PasswordResetType

type PasswordResetType struct {
	User              User
	PasswordResetLink string
	TenantId          string
}

type PasswordlessLoginType

type PasswordlessLoginType struct {
	Email            string
	UserInputCode    *string
	UrlWithLinkCode  *string
	CodeLifetime     uint64
	PreAuthSessionId string
	TenantId         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
	TLSConfig *tls.Config
}

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