diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 41f694a901..ea95cf69f4 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1617,16 +1617,8 @@ public class FragmentCompose extends FragmentBase { }; bpContent.setContent(imessage.getContent(), imessage.getContentType()); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - bpContent.writeTo(bos); - - // Just to be sure - String raw = new String(bos.toByteArray()); - raw.replaceAll(" +$", "") // trim trailing spaces - .replace("\\r?\\n", "\\r\\n"); // normalize new lines - try (OutputStream out = new FileOutputStream(input)) { - out.write(raw.getBytes()); + bpContent.writeTo(out); } } else { // Serialize message