I\'m using the Google App Engine (GAE) for PHP, and I\'m trying to use the Mailgun API to send a message with an attachment using CURL.
The attachment is on Google Clou
First, make sure you run PHP 5.5, because curl_file_create() is only supported from PHP 5.5.
Then, try to get rid of setting headers explicitly. When the value of CURLOPT_POSTFIELDS is an array, then Curl automatically sets a header for multipart/form-data. So, get rid of this:
curl_setopt($cl, CURLOPT_HTTPHEADER, $headers_arr);