0

アクティベーション コードを含む電子メールが登録済みの電子メール アドレスに送信される登録/ログイン システムがあります。Outlook.com ではメールなどを受信しますが、なぜか Gmail ではメールが受信されません。何故かはわからない。誰かが私を助けることができれば。

前もって感謝します

<?php

function send_mail($subject, $to, $text) {

$message = '

<html><body bgcolor="#f0f0f0">

<table width="720" border="0" cellspacing="0" cellpadding="0" align="center">

<tr>

<td><font style="font-family:Segoe UI, Arial; color:#0a0a0a;"><h1>Happitual</h1></font></td>

</tr>

<tr>

<td>

<font style="font-family:Segoe UI, Arial; color:#0a0a0a;">

<p>' . $text . '</p>

</font>

</td>

</tr>

<tr>

<td>

<font style="font-family:Segoe UI, Arial; color:#0a0a0a; font-size:12px;">

&copy All Rights Reserved. Happitual.

</font>

</td>

</tr>

</table>

</body></html>

';

// To send HTML mail, the Content-type header must be set

$headers = 'MIME-Version: 1.0' . "\r\n";

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

$headers .= 'From: Happitual <welcome@happitual.com>' . "\r\n";

// Mail it

mail($to, $subject, $message, $headers);

}

?> 
4

1 に答える 1

0

ぜひお役に立ちたいと思います。しかし、あなたのコードのコピーを提供していただけますか? 正しい構文を使用していないか、mail() 関数の設定が間違っている可能性があります。ヘッダーを確認しましたか?MIME バージョンはどうですか?可能な場合はコードを貼り付けてください。

于 2013-08-14T21:23:31.900 に答える