PHP code example of ahmedwassef / laravel-email-sentry

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

    

ahmedwassef / laravel-email-sentry example snippets


// Publish the Configuration file
 
return [
    'enabled' => true,
 ];


// import and use Facade
use MailSentry;


// Retrieve by user ID
$emails = MailSentry::getEmailsByUserId($userId);

// Paginate records
$emails = MailSentry::getEmailsPaginated($perPage);

// Filter records
$filters = ['from' => '[email protected]'];
$emails = MailSentry::filterEmails($filters, $perPage);

// Search by sender, recipient, etc.
$emails = MailSentry::getEmailsFrom($email, $name, $perPage); // ... similar methods for to, cc, bcc


bash
# Publish the Configuration file
php artisan EmailSentry:publish
bash
php artisan migrate