mail

package
v0.0.0-...-49ef9be Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: GPL-2.0, GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright © 2020 Elias Norberg Licensed under the GPLv3 or later. See COPYING at the root of the repository for details.

Copyright © 2020 Elias Norberg Licensed under the GPLv3 or later. See COPYING at the root of the repository for details.

Index

Constants

View Source
const (
	FlagPassed  = "P"
	FlagReplied = "R"
	FlagSeen    = "S"
	FlagTrashed = "T"
	FlagDraft   = "D"
	FlagFlagged = "F"
)
Flags as defined by the maildir specification (https://cr.yp.to/proto/maildir.html)

Flag "P" (passed): the user has resent/forwarded/bounced this message to someone else. Flag "R" (replied): the user has replied to this message. Flag "S" (seen): the user has viewed this message, though perhaps he didn't read all the way through it. Flag "T" (trashed): the user has moved this message to the trash; the trash will be emptied by a later user action. Flag "D" (draft): the user considers this message a draft; toggled at user discretion. Flag "F" (flagged): user-defined flag; toggled at user discretion.

Variables

View Source
var FlagIMAPConversionTable = map[string]string{
	FlagPassed:  "$Forwarded",
	FlagReplied: imap.AnsweredFlag,
	FlagSeen:    imap.SeenFlag,
	FlagTrashed: imap.DeletedFlag,
	FlagDraft:   imap.DraftFlag,
	FlagFlagged: imap.FlaggedFlag,
}

FlagIMAPConversionTable is used to map between maildir flags and IMAP flags

Functions

func FlagsFromIMAP

func FlagsFromIMAP(s []string) (flags []string)

FlagsFromIMAP converts from IMAP flags to maildir flags

func FlagsToIMAP

func FlagsToIMAP(s []string) (imapFlags []string)

FlagsToIMAP converts from maildir flags to IMAP flags

Types

type Info

type Info struct {
	FolderName string
	Filename   string

	UIDValidity int
	UID         int
	Flags       []string
}

Info contains basic mail information

Jump to

Keyboard shortcuts

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