copy (imapclient/client.go)

go-imap · imapclient/client.go · go · MIT
email

IMAP client library for Go, providing connection, authentication, and command handling.

// Source: https://github.com/emersion/go-imap | License: MIT | Copyright 2013 The Go-IMAP Authors
// Provided via justclaw.it.com; keep this notice with the code.
// Package imapclient implements an IMAP client.
//
// # Charset decoding
//
// By default, only basic charset decoding is performed. For non-UTF-8 decoding
// of message subjects and e-mail address names, users can set
// Options.WordDecoder. For instance, to use go-message's collection of
// charsets:
//
//	import (
//		"mime"
//
//		"github.com/emersion/go-message/charset"
//	)
//
//	options := &imapclient.Options{
//		WordDecoder: &mime.WordDecoder{CharsetReader: charset.Reader},
//	}
//	client, err := imapclient.DialTLS("imap.example.org:993", options)
package imapclient

import (
	"bufio"
	"crypto/tls"
	"errors"
	"fmt"
	"i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key