Download the PHP package julien-its/emails-queue-s5 without Composer

On this page you can find all versions of the php package julien-its/emails-queue-s5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package emails-queue-s5

Julien-ITS

emails-queue-s5

Features

Service you can use to send your emails to a queue system. All your emails will be stored in your database to keep logs of them. Send your emails directly or with a cron using the queue. Define how many emails you want to send each time you call the process queue action.

Installation

Install with composer

Before installation :

Add in your composer.json

The extra.symfony key will most probably already exist in your composer.json. In that case, add the "endpoint" key to the existing extra.symfony entry.

You can now install it via composer

Instructions

Once installed,

adjust parameters in /config/packages/emails_queue.yaml

Generate new tables in your database with doctrine

Create a new email service where you will define all your emails methods. We only add one exemple of a contact form email

<?php
namespace App\Services;
use \JulienIts\EmailsQueueBundle\Entity\EmailQueue;
class EmailService
{
    const DEFAULT_SUBJECT = "My App";
    protected $jitsEmailService;

    public function __construct(\JulienIts\EmailsQueueBundle\Services\EmailService $jitsEmailService)
    {
        $this->jitsEmailService = $jitsEmailService;
    }

    public function contact($message)
    {
        $config = array(
            'template' => 'EmailsQueueBundle:mail:contact.html.twig',
            'templateVars' => array('message' => $message),
            'emailFrom' => '[email protected]',
            'emailFromName' => 'My app',
            'contextName' => 'contact',
            'priority' => EmailQueue::HIGH_PRIORITY,
            'subject' => self::DEFAULT_SUBJECT.' : Contact',
            'emailTo' => '[email protected]',
            'emailsBcc' => '[email protected];[email protected]'
        );
        $this->jitsEmailService->createNewAndProcess($config);
    }
}

Note that you can copy the contact.html and email layout on your own appBundle to personalize them

Two possibilities when creating an emailQueue :

$this->jitsEmailService->createNew($config);
$this->jitsEmailService->createNewAndProcess($config);

createNewAndProcess Will directly process the email queue and send it to your mail service.

Send an email

To send your email, call your service in a controller :

Define the cron action

If you went to send emails by packets, you can use the command

php bin/console jits:queue:process --limit 30

All versions of emails-queue-s5 with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
symfony/framework-bundle Version >=5.0
symfony/swiftmailer-bundle Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package julien-its/emails-queue-s5 contains the following files

Loading the files please wait ....