mailpit

package
v0.71.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientWithInterfaces

func NewClientWithInterfaces(httpClient http.Client, conf Config) *client

Types

type Account

type Account struct {
	Address string `json:"Address"`
	Name    string `json:"Name"`
}

type Attachment

type Attachment struct {
	ContentID   string `json:"ContentID"`
	ContentType string `json:"ContentType"`
	FileName    string `json:"FileName"`
	PartID      string `json:"PartID"`
	Size        int    `json:"Size"`
}

type Client

type Client interface {
	ListMessages(ctx context.Context) (*ListMessagesResponse, error)
	GetMessage(ctx context.Context, id string) (*Message, error)
}

func ProvideClient

func ProvideClient(ctx context.Context, config cfg.Config, _ log.Logger) (Client, error)

type Config

type Config struct {
	Server   string `cfg:"server"`
	Protocol string `cfg:"protocol" default:"http"`
}

type ListMessagesResponse

type ListMessagesResponse struct {
	Messages []MessageSummary `json:"Messages"`
}

type Message

type Message struct {
	Attachments []Attachment `json:"Attachments"`
	Bcc         []Account    `json:"Bcc"`
	Cc          []Account    `json:"Cc"`
	Date        string       `json:"Date"`
	From        Account      `json:"From"`
	HTML        string       `json:"HTML"`
	ID          string       `json:"ID"`
	Inline      []Attachment `json:"Inline"`
	MessageID   string       `json:"MessageID"`
	ReplyTo     []Account    `json:"ReplyTo"`
	ReturnPath  string       `json:"ReturnPath"`
	Size        int          `json:"Size"`
	Subject     string       `json:"Subject"`
	Tags        []string     `json:"Tags"`
	Text        string       `json:"Text"`
	To          []Account    `json:"To"`
}

type MessageSummary

type MessageSummary struct {
	Attachments int       `json:"Attachments"`
	Bcc         []Account `json:"Bcc"`
	Cc          []Account `json:"Cc"`
	Created     time.Time `json:"Created"`
	From        Account   `json:"From"`
	ID          string    `json:"ID"`
	MessageID   string    `json:"MessageID"`
	Read        bool      `json:"Read"`
	ReplyTo     []Account `json:"ReplyTo"`
	Size        int       `json:"Size"`
	Snippet     string    `json:"Snippet"`
	Subject     string    `json:"Subject"`
	Tags        []string  `json:"Tags"`
	To          []Account `json:"To"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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