<?php
header ("Content-Type:text/xml");
include "start.php";
echo "<email>";
//---------------------------------------------------------------------------------------------------------
                   
/*
t = title
r = recipient
c = content
*/
                   
                   
$to = $_REQUEST["r"];
$subject = $_REQUEST["t"];
$message = $_REQUEST["c"];


// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: <admin@pcloud.com.my>' . "\r\n";
//$headers .= 'Cc: jong@' . "\r\n";

$send_result =  mail($to,$subject,$message,$headers);

                   
        if($send_result)
        {
            $login_status="SUCCESS";
            $message="Email Sent";
        }
        else
        {
            $login_status="FAIL";
            $message="Email Fail to Sent from Server";
        }
                   
                     
echo "<status>".$login_status."</status>
";
             
echo "<message>".str_replace("&","&amp;",$message)."</message>
";

     

//---------------------------------------------------------------------------------------------------------
echo "</email>";
?>