localhost で実行されているコードがあります。
まず、コードは次のようにいくつかのファイルを取得します。
$opts = array('http' => array('header' => 'Accept-Charset: UTF-8, *;q=0'));
$context = stream_context_create($opts);
$directory = "../V1/sector2/";
$array_filename = glob($directory . "*.html");
foreach($array_filename as $filename){
$dan = file_get_contents($filename, false, $context);
次に、コードは PCRE 関数を使用して html ファイルを変更し、最終的に gmail 電子メールに送信します。
$from = "test.com <noreply@prueba.com>";
$to = "juanfernandoz@gmail.com";
$subject =
echo "<div style='display:none;'>ob_get_contents();
echo "</div>";
$headers = "Content-type: text/html; charset=iso-8859-1 \r\n"
."MIME-Version: 1.0 \r\n"
."To: $cliente <$email> \r\n"
."From: prueba <prueba@example.com> \r\n";
mail($to,$subject,$contenido,$headers);
コードはうまく機能しますが、問題は、たとえば 30 個の html ファイルがある場合、30 個のファイルではなく 11 個のファイルしかメールに届かないことです。
なので、メール機能自体に制限があるのではないかと思います。
あなたはそれについてどう思いますか?
前もって感謝します。