function sendRegistrationMail($mailAddr, $hash) { $url = "http://www.chicon.fr/chicon/misc/confirmRegistration.php?hash=" . $hash; sendMailFromContact($mailAddr, "Account creation Confirmation", "You have just created an account on Chic'on website\nPlease confirmed your account at :\n\n" . $url . "\n\nThank You\n\n Chic'on Team"); sendMailToContact($mailAddr, "Account Creation", "A new account was created for " . $mailAddr); return true; }
function sendMagicNumberHdwMail($mailAddr, $serial, $mn) { sendMailFromContact($mailAddr, "Hardware assigned - Magic Number", "You have assign an hardware to your account, magic number was generated successfully\n\nSerial : " . $serial . "\nMagic Number: " . $mn . "\n\nThank You\n\n Chic'on Team"); sendMailToContact($mailAddr, "Hardware assigned - Magic Number", "A new hardware was assigned to " . $mailAddr . "\nSerial : " . $serial . "\nMagic Number: " . $mn . "\n"); return true; }
function sendSerialHdwMail($mailAddr, $serial) { sendMailFromContact($mailAddr, "Serial request confirmation", "You have just requested a serial for your hardware\nSerial generated is :" . $serial . "\n\nThank You\n\n Chic'on Team"); sendMailToContact($mailAddr, "Serial request confirmation", "A new serial was generated for " . $mailAddr . "\nSerial : " . $serial); return true; }
<?php include "./mailFunc.php"; $fromAddr = $_POST['fromAddr']; $subject = $_POST['subject']; $mailBody = $_POST['mailBody']; $asm = $_POST['asm']; if (isset($asm) && $asm == '') { sendMailToContact($fromAddr, $subject, $mailBody); sendMailFromContact($fromAddr, "Confirmation", "You have just send a message to the Chic'on Team. We will get back to you as soon as possible!\nThank You\n\n Chic'on Team"); } $result = array("result" => array("code" => 200, "data" => "Message sent")); echo json_encode($result);