mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-12 17:20:48 +00:00
Fix: Enforce CRLF when writing an email message to the file (#14745)
This commit is contained in:
1 parent
f5ca9bbcb6
commit
a1d76f3a19
1 file changed
+7
-1
@@ -1159,7 +1159,13 @@ class MailAccountHandler(LoggingMixin):
|
||||
new_headers += message.obj._headers
|
||||
message.obj._headers = new_headers
|
||||
|
||||
f.write(message.obj.as_bytes())
|
||||
# RFC 5322 requires CRLF; the default compat32 policy writes bare LF,
|
||||
# which Outlook misreads as literal "=" in quoted-printable soft breaks
|
||||
f.write(
|
||||
message.obj.as_bytes(
|
||||
policy=message.obj.policy.clone(linesep="\r\n"),
|
||||
),
|
||||
)
|
||||
|
||||
correspondent = self._get_correspondent(message, rule)
|
||||
|
||||
|
||||
Reference in new issue
Block a user