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 <address@example.com> wrote at some time:"?

fiatjaf
  • 11,479
  • 5
  • 56
  • 72

1 Answers1

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.

API_sheriff_orlie
  • 1,223
  • 10
  • 18
  • If the line has 2000 characters, should I force break it? – fiatjaf Jun 10 '15 at 01:48
  • Could or should? I don't want to do that, but many email clients do. It is awful. – fiatjaf Jun 11 '15 at 10:11
  • 1
    Unfortunately every email client handles this stuff differently, plain text is the only one that seems standardized across instaces :) – API_sheriff_orlie Jun 19 '15 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. https://tools.ietf.org/html/rfc2822#section-2.1.1 – Henrik Carlqvist Jun 19 '15 at 21:10