imaptest

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 14 Imported by: 0 modules, 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

Overview

Package imaptest runs go-imap's in-memory server for tests: STARTTLS on loopback (config.TLSFor skips verification there), any login name with password "password".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Inbox connects to this server's INBOX, archiving to "Eraser".
	Inbox config.InboxConfig
	// contains filtered or unexported fields
}

func Start

func Start(t testing.TB, move bool) *Server

Start serves an empty INBOX (plus the memory backend's one sample message). move adds MOVE support, which the memory backend lacks, so archiving can take either the MOVE or the COPY+EXPUNGE path.

func (*Server) Count

func (s *Server) Count(t testing.TB, folder string) int

func (*Server) Deliver

func (s *Server) Deliver(t testing.TB, folder, from, subject, body string)

Deliver puts a plain-text message dated now into folder.

func (*Server) Mailbox

func (s *Server) Mailbox(t testing.TB, name string) *memory.Mailbox

Mailbox returns the named mailbox, creating it if needed.

func (*Server) MailboxNames

func (s *Server) MailboxNames(t testing.TB) []string

MailboxNames lists every mailbox.

Jump to

Keyboard shortcuts

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