Documentation
¶
Index ¶
- type Client
- func (c *Client) ListEmails(ctx context.Context, opts ListEmailsOptions) (emails []domain.EmailMeta, err error)
- func (c *Client) ListFolders(ctx context.Context) (names []string, err error)
- func (c *Client) ReadEmail(ctx context.Context, uid string) (message domain.EmailMessage, err error)
- func (c *Client) TestConnection(ctx context.Context) (err error)
- type ListEmailsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListEmails ¶
func (*Client) ListFolders ¶
func (*Client) TestConnection ¶
TestConnection dials the IMAP server and logs in, then immediately logs out, to verify the configured host/port/credentials work without fetching any mailbox data. Unlike connect(), the dial (and the deadline covering the subsequent login) is bounded by ctx's deadline, so a host that never responds fails once ctx expires instead of hanging indefinitely.
type ListEmailsOptions ¶
ListEmailsOptions bounds a list_emails page. AfterUid/BeforeUid are raw UID strings (same format as ReadEmail's uid param); at most one may be set by the caller.
Click to show internal directories.
Click to hide internal directories.