go-imap alternatives and similar packages
Based on the "Email" category.
Alternatively, view go-imap alternatives based on common mentions on social networks and blogs.
-
hermes
Golang package that generates clean, responsive HTML e-mails for sending transactional mail -
email-verifier
:white_check_mark: A Go library for email verification without sending any emails. -
chasquid
SMTP (email) server with a focus on simplicity, security, and ease of operation [mirror] -
paperboy
💌💨 Email Campaign Delivery built with GoLang inspired by GoHugo -
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP. -
go-message
:envelope: A streaming Go library for the Internet Message Format and mail messages -
Mailchain
Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address. -
go-mail
:incoming_envelope: Simple email interface across multiple service providers (ses, postmark, mandrill, smtp) -
truemail-go
🚀 Configurable Golang 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
Less time debugging, more time building
Do you think we are missing an alternative of go-imap or a related project?
Popular Comparisons
README
go-imap
An IMAP4rev1 library written in Go. It can be used to build a client and/or a server.
Usage
Client 
package main
import (
"log"
"github.com/emersion/go-imap/client"
"github.com/emersion/go-imap"
)
func main() {
log.Println("Connecting to server...")
// Connect to server
c, err := client.DialTLS("mail.example.org:993", nil)
if err != nil {
log.Fatal(err)
}
log.Println("Connected")
// Don't forget to logout
defer c.Logout()
// Login
if err := c.Login("username", "password"); err != nil {
log.Fatal(err)
}
log.Println("Logged in")
// List mailboxes
mailboxes := make(chan *imap.MailboxInfo, 10)
done := make(chan error, 1)
go func () {
done <- c.List("", "*", mailboxes)
}()
log.Println("Mailboxes:")
for m := range mailboxes {
log.Println("* " + m.Name)
}
if err := <-done; err != nil {
log.Fatal(err)
}
// Select INBOX
mbox, err := c.Select("INBOX", false)
if err != nil {
log.Fatal(err)
}
log.Println("Flags for INBOX:", mbox.Flags)
// Get the last 4 messages
from := uint32(1)
to := mbox.Messages
if mbox.Messages > 3 {
// We're using unsigned integers here, only subtract if the result is > 0
from = mbox.Messages - 3
}
seqset := new(imap.SeqSet)
seqset.AddRange(from, to)
messages := make(chan *imap.Message, 10)
done = make(chan error, 1)
go func() {
done <- c.Fetch(seqset, []imap.FetchItem{imap.FetchEnvelope}, messages)
}()
log.Println("Last 4 messages:")
for msg := range messages {
log.Println("* " + msg.Envelope.Subject)
}
if err := <-done; err != nil {
log.Fatal(err)
}
log.Println("Done!")
}
Server 
package main
import (
"log"
"github.com/emersion/go-imap/server"
"github.com/emersion/go-imap/backend/memory"
)
func main() {
// Create a memory backend
be := memory.New()
// Create a new server
s := server.New(be)
s.Addr = ":1143"
// Since we will use this server for testing only, we can allow plain text
// authentication over unencrypted connections
s.AllowInsecureAuth = true
log.Println("Starting IMAP server at localhost:1143")
if err := s.ListenAndServe(); err != nil {
log.Fatal(err)
}
}
You can now use telnet localhost 1143
to manually connect to the server.
Extensions
Support for several IMAP extensions is included in go-imap itself. This includes:
Support for other extensions is provided via separate packages. See below.
Extending go-imap
Extensions
Commands defined in IMAP extensions are available in other packages. See the wiki to learn how to use them.
Server backends
Related projects
- go-message - parsing and formatting MIME and mail messages
- go-msgauth - handle DKIM, DMARC and Authentication-Results
- go-pgpmail - decrypting and encrypting mails with OpenPGP
- go-sasl - sending and receiving SASL authentications
- go-smtp - building SMTP clients and servers
License
MIT
*Note that all licence references and agreements mentioned in the go-imap README section above
are relevant to that project's source code only.