Documentation ¶
Overview ¶
Package mail2most is an implementation for reading and filtering emails and pushing them to mattermost
It uses the IMAP protocol to connect to an email account and can filter via:
- Folder - Subject - From - To - Time range
and pushes the subject and body into mattermost
Index ¶
- Constants
- type Attachment
- type Config
- type General
- type Logging
- type Mail
- type Mail2Most
- func (m Mail2Most) Debug(msg string, params map[string]interface{})
- func (m Mail2Most) Error(msg string, params map[string]interface{})
- func (m Mail2Most) GetMail(profile int) ([]Mail, error)
- func (m Mail2Most) Info(msg string, params map[string]interface{})
- func (m Mail2Most) ListFlags(profile int) ([]string, error)
- func (m Mail2Most) ListMailBoxes(profile int) ([]string, error)
- func (m Mail2Most) PostMattermost(profile int, mail Mail) error
- func (m Mail2Most) Run() error
- type Profile
Constants ¶
View Source
const ( // ERROR . ERROR string = "error" // INFO . INFO string = "info" // DEBUG . DEBUG string = "debug" // LOGSTDOUT . LOGSTDOUT string = "stdout" // LOGFILE . LOGFILE string = "logfile" // LOGFORMATJSON . LOGFORMATJSON string = "json" // LOGFORMATTEXT . LOGFORMATTEXT string = "text" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mail ¶
type Mail struct { ID uint32 Subject, Body string From, To []*imap.Address Date time.Time Attachments []Attachment }
Mail contains mail information
type Mail2Most ¶
Mail2Most implements the basic interface
func NewFromJson ¶
Create an M2M object from a JSON config (no more config file formats, please!)
func (Mail2Most) ListMailBoxes ¶
ListMailBoxes lists all available mailboxes
func (Mail2Most) PostMattermost ¶
PostMattermost posts a msg to mattermost
Click to show internal directories.
Click to hide internal directories.