Cancel order By a Customer Using API

New Member
2 0 0
hello Team 
I have done order cancellation funcationality for customer using API and pass parameter {"email" : true}  in post fields. like 
$option_vars = ['email' => "true"];
$ch = curl_init( $cancel_url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode($option_vars));
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
request to be done using PHP curl.
My concern is that , customer not get any cancel order  email