I’m encountering an issue when trying to integrate the Mailgun-PHP API into a Google App Engine environment with PHP. A fatal error occurs stating that the PHP cURL extension is missing, which is required by one of the underlying libraries (resulting in a RuntimeException). I need guidance on how to properly enable the cURL extension in GAE to ensure that the API works as expected. Below is an example of a simple setup check:
<?php
// Check if the cURL extension is active
if (!extension_loaded('curl')) {
exit('cURL extension is not enabled. Please update your App Engine configuration.');
}
require_once 'vendor/autoload.php';
// Create an instance of a custom mail service handler
$mailHandler = new MGHandler('YOUR_API_KEY', 'api.customdomain.com');
$response = $mailHandler->triggerMail();
echo $response;
?>