in reply to Re^3: Is ChatGPT like having a thousand monkeys? (Blank lines in emails)
in thread Is ChatGPT like having a thousand monkeys?

IMHO, only unless the OP used an empty boundary in multipart message.

https://en.wikipedia.org/wiki/MIME#Multipart_messages

Even with an empty boundary, message parts are separated by lines composed of --, followed by the (empty) boundary, followed by CR/LF. So an empty line never separates MIME message parts, it must at least begin with --. The end of all mime parts is indicated by appending another -- to the boundary.

Copying the example from Wikipedia:

MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=frontier This is a message with multiple parts in MIME format. --frontier Content-Type: text/plain This is the body of the message. --frontier Content-Type: application/octet-stream Content-Transfer-Encoding: base64 PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aG +Ug Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg== --frontier--

Changed to an empty boundary:

MIME-Version: 1.0 Content-Type: multipart/mixed; boundary= This is a message with multiple parts in MIME format. -- Content-Type: text/plain This is the body of the message. -- Content-Type: application/octet-stream Content-Transfer-Encoding: base64 PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aG +Ug Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg== ----

(I'm not sure if the empty boundary needs to be quoted. Nobody does that, anyway. The boundary should be a string that does not appear anywhere in the messages. In practice, you stuff in some random data, perhaps user agent, perhaps a timestamp. Maybe hash it. Just get a good chunk of line noise. See Re^5: Using Net::SMTP to send email attachments for more details.)

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^5: Is ChatGPT like having a thousand monkeys? (Blank lines in emails)
by LanX (Saint) on Mar 25, 2025 at 17:35 UTC
    Thanks, yes you are of course right.

    Shortly after writing I noticed my blunder, but each time I tried fixing it the monastery was unreachable for me.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

        I'm still not convinced that Outlook is the problem here, I'd say the OP used the wrong module.

        Outlook saw HTML inside a text and not HTML section, nevertheless tried to render it and failed after a line break.

        You can call this autocorrection/ DWIM a bug, I call it undefined behavior.

        Edit

        Well yes, strictly speaking the HTML should have been rendered as text.

        Anyway I remember the days when Outlook used the Word HTML renderer in the background ... (Shudder)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        see Wikisyntax for the Monastery