mail

package
v0.385.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailClient

type EmailClient interface {
	Send(context.Context, *SendEmailRequest) error
}

func NewSMTPClient

func NewSMTPClient(host, port, username, password string) EmailClient

func NewSMTPClientFromEnv

func NewSMTPClientFromEnv() EmailClient

Uses env var SMTP settings to establish new mail client. If settings are missing, nil is returned. Requires KEEL_SMTP_HOST, KEEL_SMTP_PORT, KEEL_SMTP_USER, and KEEL_SMTP_PASSWORD.

func NoOpClient

func NoOpClient() EmailClient

No op email client does not send a mail.

type SendEmailRequest

type SendEmailRequest struct {
	To        string
	From      string
	Subject   string
	PlainText string
}

Jump to

Keyboard shortcuts

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