imap

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 10 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
	Data     []byte
}

Attachment represents an email attachment

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents an IMAP client

func NewClient

func NewClient(cfg *config.IMAPConfig, log *zerolog.Logger) *Client

NewClient creates a new IMAP client

func (*Client) Connect

func (c *Client) Connect() error

Connect establishes connection to IMAP server

func (*Client) Disconnect

func (c *Client) Disconnect() error

Disconnect closes the IMAP connection

func (*Client) FetchDMARCReports

func (c *Client) FetchDMARCReports() (*FetchResult, error)

FetchDMARCReports fetches DMARC reports from the mailbox

func (*Client) MarkAsSeen

func (c *Client) MarkAsSeen(messageIDs []uint32) error

MarkAsSeen marks messages as seen

func (*Client) MoveMessages added in v1.5.0

func (c *Client) MoveMessages(messageIDs []uint32, destMailbox string) error

MoveMessages moves messages to a destination mailbox using COPY + DELETE + EXPUNGE

type FetchResult added in v1.5.0

type FetchResult struct {
	Reports    []Report
	MessageIDs []uint32
}

FetchResult holds the fetched reports and the message sequence numbers

type Report

type Report struct {
	Subject     string
	From        string
	Date        string
	Attachments []Attachment
}

Report represents a DMARC report email

Jump to

Keyboard shortcuts

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