PHP code example of bupy7 / zf-mailgun

1. Go to this page and download the library: Download bupy7/zf-mailgun library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bupy7 / zf-mailgun example snippets


[
    'modules' => [
        ...
    
        'Bupy7\Mailgun',
        
        ...
    ],
]

'mailgun' => [
    'key' => 'key-example',
    'endpoint' => 'http://bin.mailgun.net/example',
    'debug' => false,
]

$mg = $container->get('Bupy7\Mailgun\MailgunService');
$mg->messages()->->send('example.com', [
  'from'    => '[email protected]', 
  'to'      => '[email protected]', 
  'subject' => 'The PHP SDK is awesome!', 
  'text'    => 'It is so simple to send a message.'
]);

$ php composer.phar