imap

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package imap implements the backend.Provider interface by delegating to the existing fetcher and sender packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider wraps the existing fetcher/sender packages behind the backend.Provider interface.

func New

func New(account *config.Account) (*Provider, error)

New creates a new IMAP provider.

func (*Provider) ArchiveEmail

func (p *Provider) ArchiveEmail(_ context.Context, folder string, uid uint32) error

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) DeleteEmail

func (p *Provider) DeleteEmail(_ context.Context, folder string, uid uint32) error

func (*Provider) FetchAttachment

func (p *Provider) FetchAttachment(_ context.Context, folder string, uid uint32, partID, encoding string) ([]byte, error)

func (*Provider) FetchEmailBody

func (p *Provider) FetchEmailBody(_ context.Context, folder string, uid uint32) (string, []backend.Attachment, error)

func (*Provider) FetchEmails

func (p *Provider) FetchEmails(_ context.Context, folder string, limit, offset uint32) ([]backend.Email, error)

func (*Provider) FetchFolders

func (p *Provider) FetchFolders(_ context.Context) ([]backend.Folder, error)

func (*Provider) MarkAsRead

func (p *Provider) MarkAsRead(_ context.Context, folder string, uid uint32) error

func (*Provider) MoveEmail

func (p *Provider) MoveEmail(_ context.Context, uid uint32, srcFolder, dstFolder string) error

func (*Provider) SendEmail

func (p *Provider) SendEmail(_ context.Context, msg *backend.OutgoingEmail) error

func (*Provider) Watch

func (p *Provider) Watch(_ context.Context, _ string) (<-chan backend.NotifyEvent, func(), error)

Jump to

Keyboard shortcuts

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