mirror of
https://github.com/pocketbase/pocketbase.git
synced 2024-11-28 18:11:17 +02:00
26 lines
498 B
Go
26 lines
498 B
Go
package mailer
|
|
|
|
import (
|
|
"io"
|
|
"net/mail"
|
|
)
|
|
|
|
// Message defines a generic email message struct.
|
|
type Message struct {
|
|
From mail.Address
|
|
To mail.Address
|
|
Bcc []string
|
|
Cc []string
|
|
Subject string
|
|
HTML string
|
|
Text string
|
|
Headers map[string]string
|
|
Attachments map[string]io.Reader
|
|
}
|
|
|
|
// Mailer defines a base mail client interface.
|
|
type Mailer interface {
|
|
// Send sends an email with the provided Message.
|
|
Send(message *Message) error
|
|
}
|