mail

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	FileName    string `json:"filename"`
	ContentType string `json:"contentType"`
	Size        uint   `json:"size"`
}

type EmailModel

type EmailModel struct {
	User     string
	Domain   string
	Messages []*Message
}

func (*EmailModel) AddMessage

func (m *EmailModel) AddMessage(msg *Message)

func (*EmailModel) BuildNewEmail

func (m *EmailModel) BuildNewEmail() error

func (*EmailModel) ContainsMessage

func (m *EmailModel) ContainsMessage(id uint) bool

func (*EmailModel) DownloadAttachment

func (m *EmailModel) DownloadAttachment(msg *Message, att Attachment) error

func (*EmailModel) GetEmail

func (m *EmailModel) GetEmail() string

func (*EmailModel) GetMessageContent

func (m *EmailModel) GetMessageContent(msg *Message) error

func (*EmailModel) ListEmailDomains added in v0.4.0

func (m *EmailModel) ListEmailDomains() ([]string, error)

func (*EmailModel) UpdateEmailMessages

func (m *EmailModel) UpdateEmailMessages() error

type Message

type Message struct {
	Id      uint   `json:"id"`
	From    string `json:"from"`
	Subject string `json:"subject"`
	Date    string `json:"date"`
	Content MessageContent
}

func (*Message) DisplayCompleteEmail

func (msg *Message) DisplayCompleteEmail() string

func (*Message) DisplayMessage

func (msg *Message) DisplayMessage() string

type MessageContent

type MessageContent struct {
	Body        string       `json:"body"`
	TextBody    string       `json:"textBody"`
	HtmlBody    string       `json:"htmlBody"`
	Attachments []Attachment `json:"attachments"`
}

Jump to

Keyboard shortcuts

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