Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: Api.php
<?php class Api { public function send($api_key, $to, $from, $subject, $content, $reply_to = '') { // require_once(__DIR__ . '/vendor/autoload.php'); require_once(APPPATH. 'libraries/elastic_email/vendor/autoload.php'); //$api_key = '02F5709B56CC18DEAC0D1371EB47F216316EF226C402A631DD3337BF07A59B6775054217C9DBF2F827E9EEACC1827564'; // Configure API key authorization: apikey $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', $api_key); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer'); $apiInstance = new ElasticEmail\Api\EmailsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $email_message_data = new \ElasticEmail\Model\EmailMessageData([ "recipients" => [new \ElasticEmail\Model\EmailRecipient([ "email" => $to ])], "content" => new \ElasticEmail\Model\EmailContent([ "body" => [new \ElasticEmail\Model\BodyPart([ "content_type" => "HTML", "content" => $content ]) ], "from" => $from, // this email must be verified one at https://app.elasticemail.com/api/settings/domains/email-verification/ "subject" => $subject, "reply_to" => $reply_to, // this email must be verified one at https://app.elasticemail.com/api/settings/domains/email-verification/ ])/*, "options" => new \ElasticEmail\Model\Options([ "track_opens" => true // to enable tracking email opens ])*/ ]); try { $response = $apiInstance->emailsPost($email_message_data); // print('<pre>' . print_r( $response, true) . '</pre>'); } catch (Exception $e) { // echo 'Exception when calling EmailsApi->emailsPost: ', $e->getMessage(), PHP_EOL; } } } ?>