Need your kind help on this matter:
I write a PHP code with Oracle DB to send an auto email message to multiple email account
So far, I managed to sent the email message but only few email account received it (e.g. send to 6 recipients but only 2 or 3 received the email)
I also include below error reporting but seems like no error/warning related to email came out
ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1);
I'm using PHP version 5.3.4 and I can't update the PHP version due to access limitation (if want to use PHPmailer)
Sample code as below:
<?php ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1); include 'db_conn2.php'; set_time_limit(100); $to = "manamana@@jujumm.com.sg"; $subject = "Daily Product Report"; //sql - starts below $strSQL3 = "SELECT NO_ID, PROD from table_A"; $objParse3 = oci_parse ($conn, $strSQL3); oci_execute ($objParse3); //Run report 3 email starts below while($objResult3 = oci_fetch_array($objParse3,OCI_BOTH)){ $ayam3 .= "<tr><td>".$objResult3["NO_ID"]."</td>"; $ayam3 .= "<td>".$objResult3["PROD"]."</td></tr>"; } $message = " <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'> <html> <head> <title>Daily Report</title> <style> table { border-collapse: collapse; } table, td, th { border: 1px solid black; } th { padding: 15px; } td { padding: 6px; text-align: center; vertical-align: middle; } </style> </head> <body> <b>This is just a test email to confirm email receiption.</b><br/> <p>Good Day</p> <p>Dear Sir/Madam</p> <p>Summary for: ".date('l jS \of F Y', time() - 60 * 60 * 24)."</p> <p>Detail List:</p> <table> <tr> <th style='background-color:#bcdcfd'>NUMBER</th> <th style='background-color:#bcdcfd'>PRODUCTNAME</th> </tr> ". htmlspecialchars_decode($ayam3) ." </table> <br/> <p>[This email report was auto generated by the system on: ".date('l jS \of F Y h:i:s A')."]</p> <p>Thank you kindly</p> </body> </html> "; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: <helpdesk@jujumm.com.sg>' . "\r\n"; $headers .= 'cc: man@jujumm.com.sg' . "\r\n"; $headers .= 'cc: oman@jujumm.com.sg' . "\r\n"; $headers .= 'cc: arman@jujumm.com.sg' . "\r\n"; $headers .= 'cc: roman@jujumm.com.sg' . "\r\n"; $headers .= 'cc: toman@jujumm.com.sg' . "\r\n"; mail($to,$subject,$message,$headers); ?>
Please advice. Thanks.