email

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

Connector implements daneel.Connector for email using IMAP IDLE.

func Listen

func Listen(username, password string, opts ...Option) *Connector

Listen creates an email connector.

func (*Connector) Messages

func (c *Connector) Messages() <-chan daneel.IncomingMessage

Messages returns the channel of incoming messages.

func (*Connector) Send

func (c *Connector) Send(ctx context.Context, to string, content string) error

Send sends an email reply.

func (*Connector) Start

func (c *Connector) Start(ctx context.Context) error

Start begins polling IMAP for new messages.

func (*Connector) Stop

func (c *Connector) Stop() error

Stop stops the connector.

type Option

type Option func(*Connector)

Option configures the email Connector.

func WithIMAP

func WithIMAP(host string, port int) Option

WithIMAP sets IMAP server config.

func WithPollInterval

func WithPollInterval(d time.Duration) Option

WithPollInterval sets IMAP poll interval.

func WithSMTP

func WithSMTP(host string, port int) Option

WithSMTP sets SMTP server config.

Jump to

Keyboard shortcuts

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