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
|
<?php require("inc/class.phpmailer.php");
//$mailto = htmlspecialchars($_GET["mailto"], ENT_QUOTES); $q_warning = htmlspecialchars($_GET["q_warning"], ENT_QUOTES); $q_alert = htmlspecialchars($_GET["q_alert"], ENT_QUOTES); $q_email = "erp@diagcor.com"; $creationday= date("Y-m-d H:i:s");
$body = 'Alert Date: '.$creationday.'<br /><br /> Warning Lab No.: '.$q_warning.'<br /><br /> Alert Lab No.: '.$q_alert.'<br /><br />'; // Location: <br />'.str_replace("\r", '', preg_replace( "/\n/", "<br>", $q_subject)).'<br /><br />';
//echo $body;
$x_mail = new PHPMailer(); $x_mail->IsSMTP();
$x_mail->Host = "localhost"; //$x_mail->Host = "smtp.gmail.com"; //$x_mail->Host = "192.168.11.99";
//$x_mail->SMTPAuth = true; $x_mail->CharSet = "utf-8"; $x_mail->From = $q_email; $x_mail->FromName = "ERP Auto Alert"; $x_mail->AddAddress("erp@diagcor.com"); $x_mail->AddAddress("manfok@onesolution.com.hk"); $x_mail->WordWrap = 50; $x_mail->IsHTML(true); $x_mail->Subject = "[diagcor] ERP Auto Alert"; $x_mail->Body = $body; $x_mail->Send();
// header("Location: thankyou.html"); echo "Done"; exit; ?>
|