0

これは bluehost にあります - gmail 以外の他のクライアントに送信しようとしましたが、それでも同じ問題が発生します。すべての html がプレーンテキスト / タグとして表示されます。html にレンダリングされません。

    $to = '###@gmail.com';

    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: $from \r\n";


    $headers = array(

    'From' => "###@####.com",

    'Cc' => "####@gmail.com",

    'Subject' => "Your Reminder From Remindmeto.org",

    );



    $body = '<html><body>';
    $body .= '<h1>From the mists of memory I speak...</h1>';
    $body .= "$image";
    $body .= '</body></html>';



    $mail = Mail::factory("mail");

    $mail->send($to, $headers, $body);
4

1 に答える 1

0

ヘッダーを2回設定しています。これに変更します:

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from \r\n";
$headers .= "Cc: ####@gmail.com \r\n";
$headers .= "Subject: Your Reminder From Remindmeto.org \r\n";

そして、配列部分を取り除きます:)

于 2012-09-03T01:36:33.410 に答える