/home/banprang/domains/plai.go.th/public_html/coremain/module/product/send_new_output.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
$arr_checkbox 
$_POST[check_box];

$msg "<b>บริษัทโคราชวิศวกรรม จำกัด <b><br/><br/>";
$msg .= "เราได้มีสินค้าใหม่และสินค้าโปรโมชั่นมานำเสนอท่านดังต่อไปนี้ <br/><br/>";
foreach (
$arr_checkbox as $id_product){
    
$product select_query_object("*","cms_product","id_product",$id_product);
    
$msg .= "<img src='http://".$_SERVER['HTTP_HOST']."/".$_SESSION[web_name]."/module_product/picture/".$product->picture."'/>";
    
$msg .= "ชื่อผลิตภัณฑ์ : ".$product->name."<br/>";
    
$msg .= "รายละเอียด  : ".strip_tags($product->description)."<br/>";
    
$msg .= "LINK     : <a href='".$_SERVER['HTTP_HOST']."/index.php?mod=project_full&id_project=$id_product&path=project'>คลิ๊กที่นี่</a> <br/>";
}
$msg.= "เรามีความยินดีที่ท่านได้ร่วมเป็นส่วนหนึ่งกับเรา";
$msg;


$mail = new MIMEMAIL("HTML");

$mail->senderName "KORATGROUP ENGINEERING";
$mail->senderMail "oan_pokemon@hotmail.com";
//$mail->bcc = "bcc@email";

$mail->subject "Promotion and New product releash";

$mail->body $msg// OR: $mail->body = "path_to_file/filename";

$mail->attachment[] = "contact.php";
//$mail->attachment[] = "path_to_file2/filename2";
//...

$mail->create();
$send_to "";
$mail_list select_result_query("email","cms_user_profile","1","1");
while (
$data_mail mysql_fetch_array($mail_list)){
    
$send_to .=",".$data_mail[email];
}
$send_to substr($send_to,1);
$mail->send("oan_pokemon@hotmail.com");
//$mail->send($send_to);
//$mail->send("recipient2@email,recipient3@email,recipient4@email");
echo $msg;
?>