PHP code example of moltencore / laravel-mailjet

1. Go to this page and download the library: Download moltencore/laravel-mailjet 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/ */

    

moltencore / laravel-mailjet example snippets


'providers' => [
    ...
    Mailjet\LaravelMailjet\MailjetServiceProvider::class,
    ...
]

use Mailjet\LaravelMailjet\MailjetServiceProvider;

return [
    App\Providers\AppServiceProvider::class,
    MailjetServiceProvider::class,
];

'aliases' => [
    ...
    'Mailjet' => Mailjet\LaravelMailjet\Facades\Mailjet::class,
    ...
]

'mailjet' => [
    'key' => env('MAILJET_APIKEY'),
    'secret' => env('MAILJET_APISECRET'),
]

MAILJET_APIKEY=YOUR_APIKEY
MAILJET_APISECRET=YOUR_APISECRET
MAIL_FROM_ADDRESS=YOUR_EMAIL_FROM_ADDRESS
MAIL_FROM_NAME=YOU_FROM_NAME

'providers' => [
    ...
    \Mailjet\LaravelMailjet\Providers\ContactsServiceProvider::class,
    ...
]

public function handle(ContactsV4Service $contactsV4Service)
{
    $response = $contactsV4Service->delete(351406781);
    ...
}