PHP E-Mail Encoding?

后端 未结 7 1541
甜味超标
甜味超标 2020-11-29 08:26

I am having some trouble with foreign characters when sending an e-mail. Could someone advise me on what to do? I suspect the problem could be one of three things.

7条回答
  •  时光说笑
    2020-11-29 08:41

    I use the following code:

      $text = "";
      $text .= "\n";
      $text .= "\n";
    
      $text .= "Add Your text here . . .";
      $text .= date("d.m.Y") . " 

    \n\n"; $text .= "\n"; $text .= "\n"; $headers = 'From: ' . $myEmail . "\r\n"; $headers .= 'To: ' . $depEmail . "\r\n"; $headers .= 'Return-Path: ' . $myEmail . "\r\n"; $headers .= 'MIME-Version: 1.0' ."\r\n"; $headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' . "\r\n"; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\r\n"; $headers .= $text . "\r\n"; set_time_limit(30); if (!mail('', 'Demande information', '', $headers)) { Alert(...)

提交回复
热议问题