Versions in this module Expand all Collapse all v0 v0.2.0 Nov 21, 2026 Changes in this version type WaitTimeoutError + LastErr error v0.1.0 Nov 21, 2026 Changes in this version + const DefaultBaseURL + const DefaultMaxRetries + const DefaultTimeout + const Version + var ErrMissingAPIKey error = &clientError + type APIConnectionError struct + Err error + Message string + func (e *APIConnectionError) Error() string + func (e *APIConnectionError) Unwrap() error + type APIError struct + Body any + Code ErrorCode + Header http.Header + Message string + RateLimit *RateLimitInfo + Status int + func (e *APIError) Error() string + type APITimeoutError struct + func (e *APITimeoutError) Timeout() bool + func (e *APITimeoutError) Unwrap() error + type Attachment struct + ContentType string + FileName *string + ID string + SizeBytes int64 + type AuthenticationError struct + func (e *AuthenticationError) Unwrap() error + type BadRequestError struct + func (e *BadRequestError) Unwrap() error + type BodyState string + const BodyStateOverflow + const BodyStateStored + const BodyStateUnparsed + type Client struct + Domains *DomainsService + Limits *LimitsService + Mailboxes *MailboxesService + Messages *MessagesService + func NewClient(opts ...Option) (*Client, error) + func (c *Client) BaseURL() string + func (c *Client) WaitForCode(ctx context.Context, address string, opts *WaitOptions) (string, error) + func (c *Client) WaitForLink(ctx context.Context, address string, opts *WaitOptions) (string, error) + func (c *Client) WaitForMessage(ctx context.Context, address string, opts *WaitOptions) (*SimpleMessage, error) + type ConflictError struct + func (e *ConflictError) Unwrap() error + type CreateMailboxParams struct + Domain string + LocalPart string + type DetailedMessage struct + Attachments []Attachment + BodyState BodyState + Codes []string + CreatedAt time.Time + From *Sender + HTML *string + ID string + Links []Link + Subject *string + Text *string + type Domain struct + Name string + Type DomainType + type DomainType string + const DomainTypePremium + const DomainTypePublic + type DomainsService struct + func (s *DomainsService) List(ctx context.Context, opts ...RequestOption) ([]Domain, error) + type DownloadedAttachment struct + ContentType string + Data []byte + FileName *string + type ErrorCode string + const ErrorCodeAddressTaken + const ErrorCodeBadRequest + const ErrorCodeConfirmationRequired + const ErrorCodeDomainExists + const ErrorCodeDomainUnavailable + const ErrorCodeForbidden + const ErrorCodeInternalServerError + const ErrorCodeInvalidState + const ErrorCodeMethodNotAllowed + const ErrorCodeNotFound + const ErrorCodeOAuthRequired + const ErrorCodePayloadTooLarge + const ErrorCodePlanForbidden + const ErrorCodePlanLimitExceeded + const ErrorCodeQuotaExhausted + const ErrorCodeRateLimitExceeded + const ErrorCodeTooManyWaits + const ErrorCodeUnauthorized + const ErrorCodeUnsupportedMediaType + type FakeEmailError interface + type InternalServerError struct + func (e *InternalServerError) Unwrap() error + type Limits struct + ConcurrentWaits int + MailboxTTLSeconds int + Quota Quota + RequestsPerMinute int + Storage Storage + type LimitsService struct + func (s *LimitsService) Get(ctx context.Context, opts ...RequestOption) (*Limits, error) + type Link struct + Text *string + URL string + type ListAllParams struct + Size int + type Mailbox struct + ActiveSince time.Time + Address string + ExpiresAt time.Time + MessagesCount int + StorageUsedBytes int64 + type MailboxPage = Page[Mailbox] + type MailboxesService struct + func (s *MailboxesService) Create(ctx context.Context, params *CreateMailboxParams, opts ...RequestOption) (*Mailbox, error) + func (s *MailboxesService) Delete(ctx context.Context, address string, opts ...RequestOption) error + func (s *MailboxesService) Get(ctx context.Context, address string, opts ...RequestOption) (*Mailbox, error) + func (s *MailboxesService) List(ctx context.Context, params *PageParams, opts ...RequestOption) (*MailboxPage, error) + func (s *MailboxesService) ListAll(ctx context.Context, params *ListAllParams, opts ...RequestOption) iter.Seq2[Mailbox, error] + type MessagePage = Page[SimpleMessage] + type MessagesService struct + func (s *MessagesService) Attachment(ctx context.Context, address, id, attachmentID string, opts ...RequestOption) (*DownloadedAttachment, error) + func (s *MessagesService) Delete(ctx context.Context, address, id string, opts ...RequestOption) error + func (s *MessagesService) Get(ctx context.Context, address, id string, opts ...RequestOption) (*DetailedMessage, error) + func (s *MessagesService) List(ctx context.Context, address string, params *PageParams, opts ...RequestOption) (*MessagePage, error) + func (s *MessagesService) ListAll(ctx context.Context, address string, params *ListAllParams, ...) iter.Seq2[SimpleMessage, error] + func (s *MessagesService) Raw(ctx context.Context, address, id string, opts ...RequestOption) ([]byte, error) + func (s *MessagesService) Wait(ctx context.Context, address string, params *WaitParams, opts ...RequestOption) (*SimpleMessage, error) + type NotFoundError struct + func (e *NotFoundError) Unwrap() error + type Option func(*config) + func WithAPIKey(key string) Option + func WithBaseURL(url string) Option + func WithHTTPClient(hc *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(suffix string) Option + type Page struct + Content []T + Page int + Size int + TotalElements int64 + TotalPages int + type PageParams struct + Page int + Size int + type PermissionDeniedError struct + func (e *PermissionDeniedError) Unwrap() error + type Quota struct + Limit int + ResetsAt time.Time + Used int + type QuotaExhaustedError struct + Limit int + ResetsAt time.Time + UpgradeURL string + Used int + func (e *QuotaExhaustedError) Unwrap() error + type RateLimitError struct + RetryAfter time.Duration + func (e *RateLimitError) Unwrap() error + type RateLimitInfo struct + Limit int + Remaining int + Reset time.Time + type RequestOption func(*requestConfig) + func WithRequestMaxRetries(n int) RequestOption + func WithRequestTimeout(d time.Duration) RequestOption + type Sender struct + Address string + Name *string + type SimpleMessage struct + AttachmentsCount int + BodyState BodyState + Code *string + ConfirmLink *string + CreatedAt time.Time + From *Sender + ID string + MailboxAddress string + SizeBytes int64 + Subject *string + type Storage struct + LimitBytes int64 + UsedBytes int64 + type WaitOptions struct + After string + AfterTime time.Time + From string + Match func(*SimpleMessage) bool + Subject string + Timeout time.Duration + type WaitParams struct + After string + AfterTime time.Time + From string + Subject string + Timeout time.Duration + type WaitTimeoutError struct + Address string + Timeout time.Duration + func (e *WaitTimeoutError) Error() string