mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Once more, fix #1575 Messages sent by DeltaChat trigger spam filters due to incorrect/non-compliant formatting options
This commit is contained in:
@@ -499,7 +499,16 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
|||||||
let e2ee_guaranteed = self.is_e2ee_guaranteed();
|
let e2ee_guaranteed = self.is_e2ee_guaranteed();
|
||||||
let encrypt_helper = EncryptHelper::new(self.context).await?;
|
let encrypt_helper = EncryptHelper::new(self.context).await?;
|
||||||
|
|
||||||
let subject = encode_words(&subject_str);
|
let subject = if subject_str
|
||||||
|
.chars()
|
||||||
|
.all(|c| c.is_ascii_alphanumeric() || c == ' ')
|
||||||
|
// We do not use needs_encoding() here because needs_encoding() returns true if the string contains a space
|
||||||
|
// but we do not want to encode all subjects just because they contain a space.
|
||||||
|
{
|
||||||
|
subject_str
|
||||||
|
} else {
|
||||||
|
encode_words(&subject_str)
|
||||||
|
};
|
||||||
|
|
||||||
let mut message = match self.loaded {
|
let mut message = match self.loaded {
|
||||||
Loaded::Message { .. } => {
|
Loaded::Message { .. } => {
|
||||||
|
|||||||
Reference in New Issue
Block a user