email

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentFile

type AttachmentFile struct {
	FileName string
	FilePath string
}

type ImapUser

type ImapUser struct {
	ImapServer string
	Login      string
	Password   string
}

type InlineFile

type InlineFile struct {
	AttachmentId string
	FileName     string
	FilePath     string
}

type Message

type Message struct {
	Envelope *MessageEnvelope
	Body     *MessageBody
}

type MessageBody

type MessageBody struct {
	TextPlain       string
	TextHtml        string
	InlineFiles     []*InlineFile
	AttachmentFiles []*AttachmentFile
}

type MessageEnvelope

type MessageEnvelope struct {
	// The message unique identifier. It must be greater than or equal to 1.
	SeqNum int64
	// The message date.
	Date time.Time
	// The message subject.
	Subject string
	// From header addresses.
	FromName    string
	FromAddress string
	// The message senders.
	ToName    string
	ToAddress string
}

type ReadEmail

type ReadEmail interface {
	ReadUnseenEmails(ctx context.Context, user *ImapUser) ([]*MessageEnvelope, error)
	ReadEmail(ctx context.Context, user *ImapUser, seqNum int64) (*Message, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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