You can add as many headers as you want inside the array as long as they're prefixed with "h:" look at the line
'h:Message-Id'=> 'ndfmzn.jquf15@my.domain.com', //Your Message-ID
Below some larger explanation of how you can implement this:
<?php
$mg_api = 'key-XXX'; //YOUR API KEY
$mg_version = 'api.mailgun.net/v2/'; //ROOT URL FOR MAILGUN
$mg_domain = "samples.mailgun.org"; //YOUR DOMAIN AS SPECIFIED IN THE CONTROL PANEL
$mg_from_email = "info@samples.com"; // YOUR FROM EMAIL
$mg_reply_to_email = "info@samples.org"; // YOUR REPLY-TO EMAIL (USUALLY MATCHES FROM EMAIL)
$mg_message_url = "https://".$mg_version.$mg_domain."/messages";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt ($ch, CURLOPT_MAXREDIRS, 3);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_VERBOSE, 0);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERPWD, 'api:' . $mg_api);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_URL, $mg_message_url);
curl_setopt($ch, CURLOPT_POSTFIELDS,
array( 'from' => 'you@domain.com',
'to' => 'receiver@receiver.com',
'h:Reply-To'=> ' <' . $mg_reply_to_email . '>',
'h:Message-Id'=> 'ndfmzn.jquf15@my.domain.com', //Your Message-ID
'subject' => 'Hello',
'html' => 'Mailgun POW POW!'
));
$result = curl_exec($ch);
curl_close($ch);
$res = json_decode($result,TRUE);
print_r($res);