Skip to content

java-heroes/LaravelQueueMailSender

 
 

Repository files navigation

Laravel Queue Mail Sender

The process of sending mail at regular intervals with the help of a queue

  • 1-Composer Update
  • 2-php artisan key:generate
  • 3-php artisan migrate (to add tables)
        create_jobs_table
        create_failed_jobs_table
    
  • 4-Add your mail information to your env file
        MAIL_MAILER=smtp
        MAIL_HOST=smtp.gmail.com
        MAIL_PORT=587
        MAIL_USERNAME=YOUR MAIL ADDRESS
        MAIL_PASSWORD="YOUR PASSWORD"
        MAIL_ENCRYPTION=tls
        MAIL_FROM_ADDRESS=YOUR MAIL ADDRESS
        MAIL_FROM_NAME="MAIL NAME
    
  • 5-php artisan serve (to run your project)
  • 6-php artisan queue:work (to run the queue)
  • You can change the sending time according to your request. [app->Http->Controllers->JobController.php]
        $emailJob = (new SendEmail($details, $id))->delay(Carbon::now()->addSeconds(5));
    
  • You can set execution time. [app->Http->Controllers->JobController]
        php ini_set('max_execution_time', 1000000);
    
  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages

    • PHP 81.5%
    • Blade 17.7%
    • Shell 0.8%