diff --git a/internal/smtp/preferences_test.go b/internal/smtp/preferences_test.go index 45f172f9..c0e3446e 100644 --- a/internal/smtp/preferences_test.go +++ b/internal/smtp/preferences_test.go @@ -254,6 +254,20 @@ func TestPreferencesBuilder(t *testing.T) { wantMIMEType: "multipart/mixed", }, + { + name: "external with sign enabled, sending plaintext, should still send as ClearMIME", + + contactMeta: &ContactMetadata{Sign: true, SignIsSet: true}, + receivedKeys: []pmapi.PublicKey{}, + isInternal: false, + mailSettings: pmapi.MailSettings{PGPScheme: pmapi.PGPMIMEPackage, DraftMIMEType: "text/plain"}, + + wantEncrypt: false, + wantSign: true, + wantScheme: pmapi.ClearMIMEPackage, + wantMIMEType: "multipart/mixed", + }, + { name: "external with pinned contact public key but no intention to encrypt/sign",