imap

package
v0.0.0-...-cf60597 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(c *imapclient.Client, seqSet imap.SeqSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

AddFlags adds the specified flag(s) to the specified message(s).

func Authenticate

func Authenticate(c *imapclient.Client, saslClient sasl.Client) error

Authenticate advises the server that the client wants to initiate a SASL authentication mechanism to prove its identity. The client may only select a SASL method advertised by the server, which is shown in the response to the command CAPABILITY.

func Capability

func Capability(c *imapclient.Client) (imap.CapSet, error)

func Caps

func Caps(c *imapclient.Client) imap.CapSet

func Close

func Close(c *imapclient.Client) error

func Connect

func Connect(host string, port int64, tls bool) (*imapclient.Client, error)

func Copy

func Copy(c *imapclient.Client, seqSet imap.SeqSet, mailbox string) (*imap.CopyData, error)

Copy copies the specified message(s) to the end of the specified destination mailbox.

func Create

func Create(c *imapclient.Client, mailbox string) error

Create creates a new mailbox or folder.

func Delete

func Delete(c *imapclient.Client, mailbox string) error

Delete deleted a named mailbor or folder.

func DeleteFlags

func DeleteFlags(c *imapclient.Client, seqSet imap.SeqSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

DeleteFlags removes the specified flag(s) from the specified message(s).

func Examine

func Examine(c *imapclient.Client, mailbox string) (*imap.SelectData, error)

Examine does the exact same thing as SELECT, except that it selects the folder in read-only mode, meaning that no changes can be effected on the folder.

func Expunge

func Expunge(c *imapclient.Client) error

Expunge permanently removes all messages that have the \Deleted flag set from the currently selected mailbox.

func Fetch

func Fetch(c *imapclient.Client, seqSet imap.SeqSet, options ...*imap.FetchOptions) ([]*imapclient.FetchMessageBuffer, error)

Fetch retrieves data associated with a message in the mailbox.

func LSub

func LSub(c *imapclient.Client, referenceName, mailboxPattern string) ([]*imap.ListData, error)

LSub lists all the mailboxes and folders present within the server's namespace.

func List

func List(c *imapclient.Client, referenceName, mailboxPattern string) ([]*imap.ListData, error)

List lists all the mailboxes and folders present within the server's namespace.

func Login

func Login(c *imapclient.Client, username, password string) error

Login advises the server that the client wants to login with a username and password to prove its identity.

func Logout

func Logout(c *imapclient.Client) error

Logout advises the server that the client wants to log out.

func Move

func Move(c *imapclient.Client, seqSet imap.SeqSet, mailbox string) (*imapclient.MoveData, error)

Move moves the specified message(s) to the end of the specified destination mailbox.

func Rename

func Rename(c *imapclient.Client, existingName, newName string) error

Rename renames a mailbox or folder from one name to a new name.

func Search(c *imapclient.Client, criteria *imap.SearchCriteria, options ...*imap.SearchOptions) (*imap.SearchData, error)

Search searches the mailbox for messages that match the given searching criteria.

func Select

func Select(c *imapclient.Client, mailbox string) (*imap.SelectData, error)

Select instructs the server that the client now wishes to select a particular mailbox or folder, and any commands that relate to a folder should assume this folder as the target of that command.

func SetFlags

func SetFlags(c *imapclient.Client, seqSet imap.SeqSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

SetFlags replaces the flags of the specified message(s) with the specified flag(s).

func StartTLS

func StartTLS(c *imapclient.Client, config *tls.Config) error

StartTLS instructs the server that the client wishes to encrypt the session now. This command may only be issued if the server advertised that STARTTLS is available and supported. If a successful key negotiation results after this command is issued, then the session is encrypted and IMAP commands continue.

func State

func State(c *imapclient.Client) imap.ConnState

func Status

func Status(c *imapclient.Client, mailbox string, options *imap.StatusOptions) (*imap.StatusData, error)

Status requests the status of the indicated mailbox.

func Store

func Store(c *imapclient.Client, seqSet imap.SeqSet, flags *imap.StoreFlags, options ...*imap.StoreOptions) ([]*imapclient.FetchMessageBuffer, error)

Store retrieves data associated with a message in the mailbox.

func StreamFetch

func StreamFetch(c *imapclient.Client, seqSet imap.SeqSet, options ...*imap.FetchOptions) *imapclient.FetchCommand

StreamFetch retrieves data associated with a message in the mailbox.

func StreamSearch

func StreamSearch(c *imapclient.Client, criteria *imap.SearchCriteria, options ...*imap.SearchOptions) *imapclient.SearchCommand

StreamSearch searches the mailbox for messages that match the given searching criteria.

func StreamStore

func StreamStore(c *imapclient.Client, seqSet imap.SeqSet, flags *imap.StoreFlags, options ...*imap.StoreOptions) *imapclient.FetchCommand

StreamStore retrieves data associated with a message in the mailbox.

func StreamUIDFetch

func StreamUIDFetch(c *imapclient.Client, uidSet imap.UIDSet, options ...*imap.FetchOptions) *imapclient.FetchCommand

StreamUIDFetch retrieves data associated with a message in the mailbox.

func StreamUIDSearch

func StreamUIDSearch(c *imapclient.Client, criteria *imap.SearchCriteria, options ...*imap.SearchOptions) *imapclient.SearchCommand

StreamUIDSearch searches the mailbox for messages that match the given searching criteria.

func StreamUIDStore

func StreamUIDStore(c *imapclient.Client, uidSet imap.UIDSet, flags *imap.StoreFlags, options ...*imap.StoreOptions) *imapclient.FetchCommand

StreamUIDStore retrieves data associated with a message in the mailbox.

func Subscribe

func Subscribe(c *imapclient.Client, mailbox string) error

Subscribe adds the specified mailbox name to the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command.

func UIDAddFlags

func UIDAddFlags(c *imapclient.Client, uidSet imap.UIDSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

UIDAddFlags adds the specified flag(s) to the specified message(s).

func UIDCopy

func UIDCopy(c *imapclient.Client, uidSet imap.UIDSet, mailbox string) (*imap.CopyData, error)

UIDCopy copies the specified message(s) to the end of the specified destination mailbox.

func UIDDeleteFlags

func UIDDeleteFlags(c *imapclient.Client, uidSet imap.UIDSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

UIDDeleteFlags removes the specified flag(s) from the specified message(s).

func UIDExpunge

func UIDExpunge(c *imapclient.Client, uidSet imap.UIDSet) error

UIDExpunge permanently removes all messages that have the \Deleted flag set.

func UIDFetch

func UIDFetch(c *imapclient.Client, uidSet imap.UIDSet, options ...*imap.FetchOptions) ([]*imapclient.FetchMessageBuffer, error)

UIDFetch retrieves data associated with a message in the mailbox.

func UIDMove

func UIDMove(c *imapclient.Client, uidSet imap.UIDSet, mailbox string) (*imapclient.MoveData, error)

UIDMove moves the specified message(s) to the end of the specified destination mailbox.

func UIDSearch

func UIDSearch(c *imapclient.Client, criteria *imap.SearchCriteria, options ...*imap.SearchOptions) (*imap.SearchData, error)

UIDSearch searches the mailbox for messages that match the given searching criteria.

func UIDSetFlags

func UIDSetFlags(c *imapclient.Client, uidSet imap.UIDSet, flags []imap.Flag, silent bool) ([]*imapclient.FetchMessageBuffer, error)

UIDSetFlags replaces the flags of the specified message(s) with the specified flag(s).

func UIDStore

func UIDStore(c *imapclient.Client, uidSet imap.UIDSet, flags *imap.StoreFlags, options ...*imap.StoreOptions) ([]*imapclient.FetchMessageBuffer, error)

UIDStore retrieves data associated with a message in the mailbox.

func Unauthenticate

func Unauthenticate(c *imapclient.Client) error

Unauthenticate advises the server that the client wants to log out.

func Unselect

func Unselect(c *imapclient.Client) error

Unselect does the exact same thing as CLOSE, except that it does not expunge deleted messages.

func Unsubscribe

func Unsubscribe(c *imapclient.Client, mailbox string) error

Unsubscribe removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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