<aside> <img src="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/14ed7cb3-d76c-809a-8bc2-007a409b7fa6" alt="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/14ed7cb3-d76c-809a-8bc2-007a409b7fa6" width="40px" /> TABLE OF CONTENTS


</aside>

<aside> <img src="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/134d7cb3-d76c-8047-bfd3-007a2861e4d7" alt="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/134d7cb3-d76c-8047-bfd3-007a2861e4d7" width="40px" /> DOCS | This documentation is frequently updated to improve clarity and keep up with the latest changes in the package. Please make sure to read everything carefully to ensure a smooth installation and setup experience. If something feels unclear or doesn’t work as expected, feel free to reach out or check back for updates!

</aside>

Installations

Requirements

Activating Your License

<aside> 💡

Email Pro leverages AnyStack for seamless payment processing, licensing, and distribution. you can buy here

</aside>

Add the following repository to your composer.json file:

"repositories": [
    {
        "type": "composer",
        "url": "<https://email-pro.composer.sh>"
    }
],

Then install the package:

composer require cvcwebsolutions/email-pro

You will be prompted to provide your username and password:

Username: [licensee-email]
Password: [license-key]

Configure Google API in Laravel

  1. Configure your Google OAuth credentials in .env:
GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
GOOGLE_REDIRECT_URI="https://your_domain.com/mail/oauth/callback/google"
  1. Add Google credentials in config/services.php:
'google' => [
    'client_id' => env('GOOGLE_CLIENT_ID'),
    'client_secret' => env('GOOGLE_CLIENT_SECRET'),
    'redirect' => env('GOOGLE_REDIRECT_URI'),
],

Publishing Configuration and Migrations

Publish the config file:

php artisan vendor:publish --tag="email-pro-config"

Publish and run migrations:

php artisan vendor:publish --tag="email-pro-migrations"
php artisan migrate

Optionally, publish the views:

php artisan vendor:publish --tag="email-pro-views"

Usage

Updating User Model

Add the HasEmailProviders trait to the User model:

use Cvcwebsolutions\\EmailPro\\Traits\\HasEmailProviders;
use Illuminate\\Database\\Eloquent\\Model;

YourUserModel extends Model {
    use HasEmailProviders;
}

Setting Up Queues

<aside> 💡

Since email operations involve API requests, it's recommended to use a queue system:

</aside>

QUEUE_CONNECTION=database

or

QUEUE_CONNECTION=redis

Start the queue worker:

php artisan queue:work

Registering the Plugin

To use this package, register the plugin in your Filament Panel Provider class:

use Cvcwebsolutions\\EmailPro\\EmailProPlugin;

// ...
->plugins([
    EmailProPlugin::make()
]);

It will generate a navigation menu item based on config('email-pro.filament.menu_item'):

main-menu.png

Clicking the menu will lead to the settings page:

settings-page.png