mailbox

package
v0.0.0-...-637ee02 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2015 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FoldersHandler

func FoldersHandler(resp http.ResponseWriter, req *http.Request)

Handle /mailbox/<email>/folders

func GetLastUIDs

func GetLastUIDs(alluids []uint32) *imap.SeqSet

func GetUIDs

func GetUIDs(mbox string, client *imap.Client) ([]uint32, error)

func MessageHandler

func MessageHandler(resp http.ResponseWriter, req *http.Request)

Types

type Folder

type Folder struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

func GetFolders

func GetFolders(client *imap.Client) ([]*Folder, error)

= Return list of IMAP folders

type FoldersPayload

type FoldersPayload struct {
	Success bool      `json:"success"`
	Folders []*Folder `json:"folders"`
	Error   string    `json:"error"`
}

type Message

type Message struct {
	Uid    uint32 `json:"uid"`
	Folder string `json:"folder"`

	FromName  string `json:"from_name"`
	FromEmail string `json:"from_email"`

	Date string `json:"date"`

	Seen     bool `json:"seen"`
	Flagged  bool `json:"flagged"`
	Answered bool `json:"answered"`

	Subject  string `json:"subject"`
	BodyHtml string `json:"body_html"`
	BodyText string `json:"body_text"`

	ContentType string `json:"content_type"`
}

===================================================================

func GetMessage

func GetMessage(folder, uid string, client *imap.Client) (messag *Message, e error)

type MessagePayload

type MessagePayload struct {
	Success bool     `json:"success"`
	Message *Message `json:"message"`

	Error string `json:"error"`
}

Jump to

Keyboard shortcuts

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