email

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONMessage

type JSONMessage struct {
	From        map[string]any `json:"from"`
	To          map[string]any `json:"to"`
	ReplyTo     map[string]any `json:"replyTo"`
	DeliveredTo string         `json:"deliveredTo"`
	Subject     string         `json:"subject"`
	Date        time.Time      `json:"date"`
	Body        string         `json:"body"`
	Headers     mail.Header    `json:"headers"`
}

type Message

type Message struct {
	Header mail.Header
	Body   string
	// contains filtered or unexported fields
}

func ParseMessage

func ParseMessage(rawMessage []byte) (*Message, error)

func (*Message) GetDate

func (m *Message) GetDate() (time.Time, error)

func (*Message) GetDeliveredTo

func (m *Message) GetDeliveredTo() string

func (*Message) GetFrom

func (m *Message) GetFrom() *mail.Address

func (*Message) GetReplyTo

func (m *Message) GetReplyTo() *mail.Address

func (*Message) GetSubject

func (m *Message) GetSubject() string

func (*Message) GetTo

func (m *Message) GetTo() *mail.Address

func (*Message) LogFields

func (m *Message) LogFields() logrus.Fields

func (*Message) Raw

func (m *Message) Raw() []byte

func (*Message) ToJSON

func (m *Message) ToJSON() (any, error)

Jump to

Keyboard shortcuts

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