email

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is provider name for install.
	ProviderName = "email"
)

Variables

This section is empty.

Functions

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the provider

func GetTemplate

func GetTemplate() string

GetTemplate returns the template

func Send

func Send(_ context.Context, params *MailParams) (res *any, err error)

Send sends email

Types

type Content

type Content struct {
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

Content is the content of email

type MailParams

type MailParams = providertypes.LegacyParams[MailVars]

MailParams .

type MailVars

type MailVars struct {
	From    Sender   `json:"from"`
	To      []string `json:"to"`
	Content Content  `json:"content"`
}

MailVars .

type Sender

type Sender struct {
	Address  string `json:"address"`
	Alias    string `json:"alias,omitempty"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
}

Sender is the sender of email

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳