
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
//
// A very simple PHP example that sends a HTTP POST to a remote site
//



function send_email_api ($from,$fromn,$to,$username,$password,$cc,$bcc,$subject,$body,$attachment){

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"http://136.144.45.200/khurram/wwwroot/wwwroot/vocalcom/CRMAPP/newreports/hondaemailapi.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
            "from=".$from."&fromn=".$fromn."&to=".$to."&username=".$username."&password=".$password."&cc=".$cc."&bcc=".$bcc."&subject=".$subject."&body=".$body."&attachment=".$attachment);

// In real life you should use something like:
// curl_setopt($ch, CURLOPT_POSTFIELDS, 
//          http_build_query(array('postvar1' => 'value1')));

// Receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec($ch);

print_r($server_output);

curl_close($ch);

// Further processing ...
//if ($server_output == "OK") { ... } else { ... }
}

send_email_api('xerox@ahcl.com.sa','Price Portal','khurram.dhedhi@balubaid.com.sa','xerox@ahcl.com.sa','Vuto4101@123','','','Testing Price Portal','Khurram Testing','https://service.hondasaudi.com/priceportal/admin/app/uploads/54992310110549040001-FM items for Web Upload Oct 11, 2023.xlsx');

?>