1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
package backend
import (
"github.com/ProtonMail/gluon/rfc822"
"github.com/henrybear327/go-proton-api"
)
type mailSettings struct {
displayName string
draftMIMEType rfc822.MIMEType
attachPubKey bool
}
func newMailSettings(displayName string) *mailSettings {
return &mailSettings{
displayName: displayName,
attachPubKey: false,
}
}
func (settings *mailSettings) toMailSettings() proton.MailSettings {
return proton.MailSettings{
DisplayName: settings.displayName,
DraftMIMEType: settings.draftMIMEType,
AttachPublicKey: proton.Bool(settings.attachPubKey),
}
}
|