Please help me send a letter with the mail() function, and so that Support is written to the field from whom . How I did it:

 $header = 'Content-type: text/html; charset=utf-8 \r\n'; $header .= 'From: Support <support@gmail.com>\r\n'; 

But in this field the server address comes all the same; (If I switch places:

 $header = 'From: Support <support@gmail.com>\r\n'; $header .= 'Content-type: text/html; charset=utf-8 \r\n'; 

Then everything is fine, but the letters come in an abrocadab (How to write this correctly so that the message is in Russian and from whom was it substituted?

    2 answers 2

    Try this:

     $header = "From: Support <support@gmail.com>\r\n"; $header .= "Content-type: text/html; charset=\"utf8\"\r\n" 

    in single quotes, \r and \n not converted to the corresponding characters.

      Try this solution