9

Should I prepend all lines with '> '? Is that sufficient? Will it be accepted and understood by all major email clients? In this case will a original.replace(/\n/g, '\n> ') regex replacement do what I want with the message?

What about the HTML version of the email? Use a big <blockquote>? Just prepending a <blockquote> and appending a </blockquote> will suffice?

Should I, like Gmail and others, prepend a line saying something like "someone <[email protected]> wrote at some time:"?

1 Answer 1

4

Plain text and by that I mean: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable just requires ">" to quote the previous message (1 per line).

HTML version - depends on the client you're rendering in.

4
  • If the line has 2000 characters, should I force break it?
    – fiatjaf
    Jun 10, 2015 at 1:48
  • Could or should? I don't want to do that, but many email clients do. It is awful.
    – fiatjaf
    Jun 11, 2015 at 10:11
  • 1
    Unfortunately every email client handles this stuff differently, plain text is the only one that seems standardized across instaces :) Jun 19, 2015 at 20:05
  • You should break a line that has 2000 characters. Unless you do so your email will not be compliant with RFC2822 which says that all lines MUST be no more than 988 characters and SHOULD be no more than 78 characters excluding CRLF. tools.ietf.org/html/rfc2822#section-2.1.1 Jun 19, 2015 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.