| 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | สร้าง ฟิวด์ status ไว้ซักฟิลด์ก็ได้ครับ ค่าเริ่มต้นให้เป็น 0 ตอนส่งเมล์ ถ้าส่งสำเร็จ ก็ทำการอัพเดท ค่า status ให้เป็น 1 ก็น่าจะได้ครับ
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-07-21 13:48:14 | By :
                            mangkunzo |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | โค๊ดส่งเป็นแบบนี้ค่ะ และเราจะให้มัน update สถานะตอนไหนค่ะ 
 Code (PHP)
 
 <?
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
$objDB = mysql_select_db("customer");
$strSQL = "SELECT * FROM customer";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
while($objResult = mysql_fetch_array($objQuery))
{
	$strTo = $objResult["Email"];
	$strSubject = "Test Send Email";
	$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
	$strHeader .= "From: apinya \nReply-To: [email protected]";
	$strVar = "My Message";
	$strMessage = "
	<h1>My Message</h1><br>
	<table width='285' border='1'>
	 <tr>
	 <td><div align='center'><strong>My Message </strong></div></td>
	 <td><div align='center'><font color='red'>My Message</font></div></td>
	 <td><div align='center'><font size='2'>My Message</font></div></td>
	 </tr>
	 <tr>
	 <td><div align='center'>My Message</div></td>
	 <td><div align='center'>My Message</div></td>
	 <td><div align='center'>My Message</div></td>
	 </tr>
	 <tr>
	 <td><div align='center'>".$strVar."</div></td>
	 <td><div align='center'>".$strVar."</div></td>
	 <td><div align='center'>".$strVar."</div></td>
	 </tr>
	</table>";
	@mail($strTo,$strSubject,$strMessage,$strHeader);  // @ = No Show Error //
}
?>
 รบกวนแนะนำหน่อยนะค่ะ
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-07-21 13:54:50 | By :
                            zuzagirll |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ขอบคุนพี่วินมากเลยนะค่ะ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-07-22 08:11:26 | By :
                            zuzagirll |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              |  ขอบคุณพี่วิน 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-07-29 10:22:44 | By :
                            da |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |