<?php

include_once('../db.functions.php');

$row_email = DB::queryFirstRow("SELECT * FROM config_email WHERE ID = %i",1);

date_default_timezone_set('Asia/Kuala_Lumpur');

require_once 'PHPMailerAutoload.php';

$mail = new PHPMailer;

$mail->IsSMTP(); 
$mail->SMTPDebug = 0;
$mail->Debugoutput = 'html';                    
$mail->SMTPAuth   = true;                  
//$mail->SMTPSecure = "tls";                 
$mail->Host       = "localhost";    
$mail->Port       = 587;                   
$mail->Username   = "fbms@booking.picc.com.my";  
$mail->Password   = "@kuTerimaNikahnya"; 

$mail->setFrom('fbms@booking.picc.com.my', 'PICC Facility Booking Management System');

$mail->WordWrap = 50;
$mail->IsHTML(true);
$mail->CharSet = "text/html; charset=UTF-8;";   
$mail->addAddress($CUST_EMAIL, $CUST_NAME);


$mail->Subject = $row_email['SUBJECT'].' '.$EVENT_TITLE;

$MESSAGE = '
<b>'.$CUST_COMPANY.'</b><br>
<b>'.$CUST_NAME.'</b><br>
'.$CUST_ADD_1.'<br>
'.$CUST_ADD_2.'<br>
'.$CUST_POSTCODE.','.$CUST_CITY.'<br>
EMAIL: '.$CUST_EMAIL.'<br>
TEL:'.$CUST_TEL_1_CODE.' - '.$CUST_TEL_1.'<br><br>

Dear Sir / Madam<br><br><br>
<b><i>Submission of Booking for Event: '.$EVENT_TITLE.'</b></i><br><br>

Please be informed that your booking has been successfully submitted to the Putrajaya International Convention Centre (PICC) for further actions.<br>
You will be assigned a staff who will act on our behalf to follow up with you on your requests.<br>
If you do not hear from us in two (2) working days, please call us at +03-8887-6000.<br><br>

You may login at PICC customer portal at <a href="http://customer.picc.com.my">http://customer.picc.com.my</a> with credential below:<br><br>

Username: <b>'.$CUST_EMAIL.'</b><br>
Password: <b>'.$CUST_TEL_1.'</b><br><br>

Yours sincerely,<br>
Putrajaya International Convention Centre (PICC) <br><br>

Thank You ';

$MESSAGE_ALT = '
'.$CUST_COMPANY.'\n
'.$CUST_NAME.'\n
'.$CUST_ADD_1.'\n
'.$CUST_ADD_2.'\n
'.$CUST_POSTCODE.','.$CUST_CITY.'\n
EMAIL: '.$CUST_EMAIL.'\n
TEL:'.$CUST_TEL_1_CODE.' - '.$CUST_TEL_1.'\n\n

Dear Sir / Madam\n\n\n
Submission of Booking for Event: '.$EVENT_TITLE.'\n\n\n

Please be informed that your booking has been successfully submitted to the Putrajaya International Convention Centre (PICC) for further actions.\n
You will be assigned a staff who will act on our behalf to follow up with you on your requests.\n
If you do not hear from us in two (2) working days, please call us at +03-8887-6000.\n\n

You may login at PICC customer portal at <a href="http://customer.picc.com.my">http://customer.picc.com.my</a> with credential below:\n\n

Username: '.$CUST_EMAIL.'\n
Password: '.$CUST_TEL_1.'\n\n\n

Yours sincerely,\n
Putrajaya International Convention Centre (PICC) \n\n

Thank You ';


$MESSAGE_FOOTER = '
<b>PUTRAJAYA INTERNATIONAL CONVENTION CENTRE</b><br>
Dataran Gemilang Precinct 5<br>
62000 Putrajaya MALAYSIA<br>
<b>GL:</b> +603 88876000<br>
<b>Email:</b> info@picc.com.my<br>
<b>Website:</b> www.picc.com.my<br>
<a href="www.facebook.com/piccmalaysia"><img src="cid:s1"/></a>
<a href="www.twitter.com/piccmalaysia"><img src="cid:s2"/></a>
<a href="instagram.com/piccmalaysia"><img src="cid:s3"/></a>
<a href="www.youtube.com/user/piccmalaysia"><img src="cid:s4"/></a>
<br>
<img src="cid:img1"/><br>
<img src="cid:img2"/><br>
<img src="cid:img3"/><br>
<img src="cid:img4"/><br>

<font color="red">*******************************************************************************<br>
<u>DISCLAIMER:</u><br>
This communication contains information from Putrajaya International Convention Centre that may be confidential. Except for personal use by the intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it and all copies, and promptly notify the sender. Nothing in this communication is intended to operate as an electronic signature under applicable law.
</font><br><br>

This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.
';

$MESSAGE_FOOTER_ALT = '
PUTRAJAYA INTERNATIONAL CONVENTION CENTRE \n
Dataran Gemilang Precinct 5 \n
62000 Putrajaya MALAYSIA \n
GL: +603 88876000 (Ext: 6022)\n
Email: info@picc.com.my \n
Website: www.picc.com.my \n

DISCLAIMER: \n
This communication contains information from Putrajaya International Convention Centre that may be confidential. Except for personal use by the intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it and all copies, and promptly notify the sender. Nothing in this communication is intended to operate as an electronic signature under applicable law.
 \n\n
 
This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.

';

$mail->Body    = $MESSAGE.$MESSAGE_FOOTER;
$mail->AltBody    = $MESSAGE_ALT.$MESSAGE_FOOTER_ALT;

$mail->AddEmbeddedImage('images/s1.png', 's1');
$mail->AddEmbeddedImage('images/s2.png', 's2');
$mail->AddEmbeddedImage('images/s3.png', 's3');
$mail->AddEmbeddedImage('images/s4.png', 's4');
$mail->AddEmbeddedImage('images/img1.jpg', 'img1');
$mail->AddEmbeddedImage('images/img2.jpg', 'img2');
$mail->AddEmbeddedImage('images/img3.jpg', 'img3');
$mail->AddEmbeddedImage('images/img4.jpg', 'img4');

	if(!$mail->Send()) {

	} else {

	}

?>