Headers MIME Email Issue

I have two questions about the headers to mail PHP function

  1. For the encoding, I would like to know whether to put guillement between the type of encoding or nothing put
"Content-Type: text/plain; charset=\\"utf-8\\"\\r\


"Content-Type: text/plain; charset=utf-8\\r\
  1. It seems that the last line of the header need not contain the space character ("
    Is this true?


  1. The quotes around utf-8 are definitely optional, I personally use the quotes because I like to have them in case the variable I used for encoding contains a space.
  2. Yes, you technically do not need the \r
    for the last header line, granted, again I usually keep it in case I add additional headers in the future.


  1. I do not necessarily have to put quotes around the type of encoding (necessary only when there are spaces).
  2. The space in the last line of the header is optional.

Thank you cpradio!