XF 2.1 Error with mailgun

canina

Active member
I want to send emails with a mailgun API.
Code:
# Include the Autoloader (see "Libraries" for install instructions)
require 'vendor/autoload.php';
use Mailgun\Mailgun;

# First, instantiate the SDK with your API credentials
$mg = Mailgun::create('YOUR_API_KEY');

# Now, compose and send your message.
# $mg->messages()->send($domain, $params);
$mg->messages()->send('YOUR_DOMAIN_NAME', [
  'from'    => 'Excited User <mailgun@YOUR_DOMAIN_NAME>',
  'to'      => 'Baz <YOU@YOUR_DOMAIN_NAME>',
  'subject' => 'Hello',
  'text'    => 'Testing some Mailgun awesomness!'
]);
The autoload.php import succeeded with this extension
But in a row
Code:
use Mailgun\Mailgun;
There is an error

Code:
An exception occurred: [Error] Class 'shareinmambers\Mailgun' not found in src/addons/shareinmambers/sendemail.php on line 42

Thanks in advance
 
Back
Top Bottom