Documentation ¶
Overview ¶
file adds the common email file handling, but with a twist: here we save emails first by inbox and then subject. This package also delivers some functions to be used in the templates, for the web interface.
Index ¶
- type FileHandler
- func (f FileHandler) Mail(file string) (interfaces.Email, error)
- func (f FileHandler) Mailboxes(folder string) ([]interfaces.Mailbox, error)
- func (f FileHandler) Mails(folder string) ([]interfaces.Email, error)
- func (f FileHandler) Save(email interfaces.Email) error
- func (f FileHandler) SaveSent(email interfaces.Email) error
- func (f FileHandler) Send(mail interfaces.Email) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHandler ¶ added in v0.4.0
type FileHandler struct {
// contains filtered or unexported fields
}
FileHandler is used to configure the file email handler. Root is where mail should be saved, Templates is an optional field that is the path to templates, to be used in the web server; Password is the password for the x user, for now this is very simple; Domain is used to filter and separate emails, only emails sent to one of your domains are saved, each according to its configuration.
func NewFileHandler ¶ added in v0.4.0
func NewFileHandler(c config.InboxConfig, v interfaces.Vault, fs map[string]any) (FileHandler, error)
func (FileHandler) Mail ¶ added in v0.4.0
func (f FileHandler) Mail(file string) (interfaces.Email, error)
func (FileHandler) Mailboxes ¶ added in v0.4.0
func (f FileHandler) Mailboxes(folder string) ([]interfaces.Mailbox, error)
func (FileHandler) Mails ¶ added in v0.4.0
func (f FileHandler) Mails(folder string) ([]interfaces.Email, error)
func (FileHandler) Save ¶ added in v0.4.0
func (f FileHandler) Save(email interfaces.Email) error
func (FileHandler) SaveSent ¶ added in v0.4.0
func (f FileHandler) SaveSent(email interfaces.Email) error
func (FileHandler) Send ¶ added in v0.6.2
func (f FileHandler) Send(mail interfaces.Email) error
Click to show internal directories.
Click to hide internal directories.