Set imap.CharsetReader

This adds support for additional charsets when parsing e.g. subject
lines.
This commit is contained in:
Simon Ser 2019-12-03 17:35:04 +01:00
parent a4729060be
commit c3fd390b1a
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -10,10 +10,14 @@ import (
"github.com/emersion/go-imap"
imapclient "github.com/emersion/go-imap/client"
"github.com/emersion/go-message"
_ "github.com/emersion/go-message/charset"
"github.com/emersion/go-message/charset"
"github.com/emersion/go-message/textproto"
)
func init() {
imap.CharsetReader = charset.Reader
}
func (s *Server) connectIMAP() (*imapclient.Client, error) {
var c *imapclient.Client
var err error