<?php 







require_once "../config.php";
# Include the Autoloader (see "Libraries" for install instructions)
require '../vendor/autoload.php';
use Mailgun\Mailgun;
# Instantiate the client.
//$mgClient = new Mailgun('e2fe7da08654f7bc014d1804c5472e79-4167c382-083075dd');
$domain = "efix.lv";
# Make the call to the client.
/*$result = $mgClient->sendMessage($domain, array(
	'from'	=> 'Excited User <mailgun@sandbox1859b15781e846af8c59f8993d3822bd.mailgun.org>',
	'to'	=> 'Shayas <shayasmk@gmail.com>',
	'subject' => 'Hello',
	'text'	=> 'Testing some Mailgun awesomness!'
));*/

// First, instantiate the SDK with your API credentials
//$mg = Mailgun::create('e2fe7da08654f7bc014d1804c5472e79-4167c382-083075dd'); // For US servers
$mg = Mailgun::create('e2fe7da08654f7bc014d1804c5472e79-4167c382-083075dd', 'https://api.eu.mailgun.net'); // For EU servers

// Now, compose and send your message.
// $mg->messages()->send($domain, $params);
$mg->messages()->send($domain, [
  'from'    => 'info@efix.lv',
  'to'      => 'shayasmk@gmail.com',
  'subject' => 'The PHP SDK is awesome!',
  'text'    => 'It is so simple to send a message.'
]);