├── .editorconfig ├── .gitignore ├── HostnetQueueProgressBundle ├── Config │ └── config.php ├── Controller │ └── QueueProgressController.php ├── HostnetQueueProgressBundle.php ├── Translations │ ├── en_US │ │ └── messages.ini │ └── pt_BR │ │ └── messages.ini └── Views │ └── QueueProgressView │ └── form.html.php └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{html,php,phtml}] 15 | indent_size = 4 16 | 17 | [*.{js,json}] 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | -------------------------------------------------------------------------------- /HostnetQueueProgressBundle/Config/config.php: -------------------------------------------------------------------------------- 1 | 'Queue Progress', 5 | 'description' => 'Email queue watcher for Mautic.', 6 | 'version' => '2.0.0', 7 | 'author' => 'Hostnet Internet', 8 | 'routes' => [ 9 | 'main' => [ 10 | 'hostnet_queue_progress' => [ 11 | 'path' => '/queueprogress', 12 | 'controller' => 'HostnetQueueProgressBundle:QueueProgress:queueprogress', 13 | ] 14 | ] 15 | ], 16 | 'menu' => [ 17 | 'main' => [ 18 | 'mautic.plugin.queueprogress.title' => [ 19 | 'route' => 'hostnet_queue_progress', 20 | 'id' => 'plugin_hostnet_queueprogress', 21 | 'iconClass' => 'fa-envelope', 22 | 'priority' => -1 23 | ] 24 | ] 25 | ] 26 | ]; 27 | -------------------------------------------------------------------------------- /HostnetQueueProgressBundle/Controller/QueueProgressController.php: -------------------------------------------------------------------------------- 1 | 5 | * 6 | * @link https://www.hostnet.com.br 7 | * 8 | */ 9 | 10 | namespace MauticPlugin\HostnetQueueProgressBundle\Controller; 11 | 12 | use Mautic\CoreBundle\Controller\CommonController; 13 | use Symfony\Component\HttpFoundation\Request; 14 | use FilesystemIterator; 15 | use GlobIterator; 16 | 17 | class QueueProgressController extends CommonController 18 | { 19 | public function queueprogressAction(Request $request) 20 | { 21 | $spoolPath = $this->factory->getParameter('mailer_spool_path'); 22 | 23 | $emailQuantity = file_exists($spoolPath) 24 | ? (new GlobIterator("$spoolPath/*.message"))->count() 25 | : 0; 26 | 27 | return $this->delegateView([ 28 | 'contentTemplate' => 'HostnetQueueProgressBundle:QueueProgressView:form.html.php', 29 | 'viewParameters' => [ 30 | 'emailQuantity' => $emailQuantity 31 | ] 32 | ]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HostnetQueueProgressBundle/HostnetQueueProgressBundle.php: -------------------------------------------------------------------------------- 1 | extend('MauticCoreBundle:Default:content.html.php'); 4 | $view['slots']->set( 5 | 'headerTitle', 6 | $view['translator']->trans('mautic.plugin.queueprogress.title') 7 | ); 8 | ?> 9 | 10 |
11 |
12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 |
16 | trans('mautic.plugin.queueprogress.label')?> 17 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mautic QueueProgress 2 | 3 | A Mautic plugin that shows the number of queued emails. 4 | 5 | ## Installation 6 | 7 | Download this project as a zip file and extract the content from the zip file. 8 | 9 | Copy the **HostnetQueueProgressBundle** folder to the **plugins** folder of your Mautic installation. 10 | 11 | Clear the cache running this command from the Mautic main folder: 12 | ```sh 13 | $ php bin/console cache:clear 14 | ``` 15 | Access the plugins page in the Mautic panel and click on **Install/Update Plugins**. 16 | 17 | ## Activation and Usage 18 | 19 | Once the plugin is installed you will notice a "Queued Emails" item on the left menu. 20 | 21 | Clicking on it you will see the number of messages in the waiting list. It's all set. 22 | 23 | ## Development 24 | 25 | Este plugin é mantido pela empresa Hostnet Hospedagem de Sites, esperamos que seja útil para você. 26 | 27 | A Hostnet oferece diversas soluções mais aprimoradas para a utilização do Mautic, seja no modo "faça você mesmo", ou com todo o ambiente gerenciado por nós. 28 | 29 | Saiba mais nos links: 30 | https://www.hostnet.com.br/hospedagem-de-sites/ 31 | https://www.hostnet.com.br/mautic-automacao-marketing/ 32 | 33 | *** 34 | 35 | This plugin is developed by Hostnet Web Hosting, we hope it will be useful for you. 36 | 37 | Hostnet offers many and more enhanced solutions for using Mautic, both in "do it yourself" mode or with the whole environment managed by us. 38 | 39 | Learn more at: 40 | https://www.hostnet.com.br/hospedagem-de-sites/ 41 | https://www.hostnet.com.br/mautic-automacao-marketing/ 42 | --------------------------------------------------------------------------------