PHP code example of 2am.tech / laravel-mail-api

1. Go to this page and download the library: Download 2am.tech/laravel-mail-api 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/ */

    

2am.tech / laravel-mail-api example snippets


# register access token
...
'accessTokens' => [
    'access-key-user-1' => [
        'appKey' => 'jwYitJJOop2v',
        'appSecret' => 'token',
    ],
   ... 
];

use Laravel\Sanctum\PersonalAccessToken;

// from this 
return [
    ...
    'attachmentsAllowedMimetypes' => env('ATTACHMENT_MIMETYPES', ['application/pdf', 'image/*']),
];

// to this
return [
    ...
    'attachmentsAllowedMimetypes' => env('ATTACHMENT_MIMETYPES', '*'),
]; 
bash
$ php artisan app:create-signature
SH
$ php artisan queue:work

# or on sail
$ ./vendor/bin/sail php artisan queue:work
bash
$ php artisan config:clear