exports: set charset to UTF-8

Same as fdc51440c3 ("imap: set charset header to utf-8") but for
exports.
This commit is contained in:
Simon Ser 2020-11-23 10:02:20 +01:00
parent fdc51440c3
commit b116e0d5b0
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
package exports package exports
import ( import (
"bufio"
"fmt" "fmt"
"io" "io"
"bufio"
"strings" "strings"
"github.com/emersion/go-mbox" "github.com/emersion/go-mbox"
@ -28,7 +28,7 @@ func writeMessage(c *protonmail.Client, privateKeys openpgp.KeyRing, w io.Writer
} }
mh := mail.Header{message.Header{th}} mh := mail.Header{message.Header{th}}
mh.SetContentType(mimeType, nil) mh.SetContentType(mimeType, map[string]string{"charset", "utf-8"})
mh.Set("Content-Transfer-Encoding", "quoted-printable") mh.Set("Content-Transfer-Encoding", "quoted-printable")
// TODO: add support for attachments // TODO: add support for attachments