Help us shape the future of Go! Take the 2026 Go Developer Survey

send

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(writer http.ResponseWriter, request *http.Request)

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

Types

type Attachment

type Attachment struct {
	Name string `json:"name"`
	Data string `json:"data"`
}

type EmailRequest

type EmailRequest struct {
	To            []string          `json:"to"`
	Cc            []string          `json:"cc"`
	Bcc           []string          `json:"bcc"`
	Subject       string            `json:"subject"`
	Body          string            `json:"body"`
	Attachments   []Attachment      `json:"attachments"`
	Configuration SMTPConfiguration `json:"configuration"`
}

type LoginType

type LoginType string
const (
	Plain LoginType = "plain"
	Login LoginType = "login"
)

type SMTPConfiguration

type SMTPConfiguration struct {
	Host      string    `json:"host"`
	Port      int       `json:"port"`
	Alias     string    `json:"alias,omitempty"`
	LoginType LoginType `json:"loginType,omitempty"`
	From      string    `json:"from"`
	Password  string    `json:"password"`
}

Jump to

Keyboard shortcuts

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