sender

package
v0.0.0-...-2485d6f Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessagePropertyAttachment = "attachment"
	MessagePropertySubject    = "subject"
	MessagePropertyRecipient  = "recipient"
)

Variables

This section is empty.

Functions

func AttachmentGetContent

func AttachmentGetContent(attachment MessageProperty) string

func AttachmentGetFileName

func AttachmentGetFileName(attachment MessageProperty) string

func NewDiscordWebhook

func NewDiscordWebhook(webhook string) *discordWebhook

func NewSMTPPlainText

func NewSMTPPlainText(from, host string, port int, password, ua string) *smtpPlainText

func NewSlackWebhook

func NewSlackWebhook(webhook string) *slackWebhook

Types

type MessageProperty

type MessageProperty struct {
	Type  string
	Value string
}

func NewAttachment

func NewAttachment(fileName string, fileContent []byte) MessageProperty

func NewAttachmentFromFilePath

func NewAttachmentFromFilePath(path string) (MessageProperty, error)

func NewRecipient

func NewRecipient(address string) MessageProperty

func NewSubject

func NewSubject(subject string) MessageProperty

type Sender

type Sender interface {
	Send(ctx context.Context, message string, properties ...MessageProperty) error
}

Jump to

Keyboard shortcuts

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