{"id":13684224,"url":"https://github.com/lorenzo/cakephp-email-queue","last_synced_at":"2025-04-05T03:12:08.041Z","repository":{"id":441354,"uuid":"54056632","full_name":"lorenzo/cakephp-email-queue","owner":"lorenzo","description":"A email sending queue for CakePHP","archived":false,"fork":false,"pushed_at":"2023-11-23T05:18:32.000Z","size":89,"stargazers_count":56,"open_issues_count":10,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-11T06:33:25.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-03-16T18:27:19.000Z","updated_at":"2024-01-12T03:03:11.000Z","dependencies_parsed_at":"2024-04-10T04:38:08.327Z","dependency_job_id":"1406a63a-194b-4938-b78d-9a8173b99947","html_url":"https://github.com/lorenzo/cakephp-email-queue","commit_stats":{"total_commits":77,"total_committers":23,"mean_commits":3.347826086956522,"dds":0.5844155844155844,"last_synced_commit":"6eaf1f16f02d8b0f6c2bf48cbdf371e53f1a4993"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo%2Fcakephp-email-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo%2Fcakephp-email-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo%2Fcakephp-email-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzo%2Fcakephp-email-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzo","download_url":"https://codeload.github.com/lorenzo/cakephp-email-queue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T14:00:31.162Z","updated_at":"2025-04-05T03:12:08.016Z","avatar_url":"https://github.com/lorenzo.png","language":"PHP","funding_links":[],"categories":["Email"],"sub_categories":[],"readme":"# CakePHP Email Queue plugin #\n\nThis plugin provides an interface for creating emails on the fly and\nstore them in a queue to be processed later by an offline worker using a\ncakephp shell command.\n\nIt also contains a handy shell for previewing queued emails, a very handy tool for modifying\nemail templates and watching the result.\n\n## Requirements ##\n\n* CakePHP 4.x\n\n## Installation ##\n\n```sh\ncomposer require lorenzo/cakephp-email-queue\n```\n\nThe plugin uses Debug email transport, so make sure your email config contain it:\n\n```\n'EmailTransport' =\u003e [\n        'Debug' =\u003e [\n            'className' =\u003e 'Debug'\n        ],\n]\n```\n\n### Enable plugin\n\n```sh\nbin/cake plugin load EmailQueue\n```\n\n### Load required database table\n\nIn order to use this plugin, you need to create a database table.\nRequired SQL is located at\n\n\t# config/Schema/email_queue.sql\n\nJust load it into your database. You are free to change the file to use an integer primary\nkey instead of UUIDs.\n\nOr run migrations command:\n\n    bin/cake migrations migrate --plugin EmailQueue\n\n## Usage\n\nWhenever you need to send an email, use the EmailQueue model to create\nand queue a new one by storing the correct data:\n\n    use EmailQueue\\EmailQueue;\n    EmailQueue::enqueue($to, $data, $options);\n\n`enqueue` method receives 3 arguments:\n\n- First argument is a string or array of email addresses that will be treated as recipients.\n- Second arguments is an array of view variables to be passed to the\n  email template\n- Third arguments is an array of options, possible options are\n * `subject`: Email's subject\n * `send_at`: date time sting representing the time this email should be sent at (in UTC)\n * `template`:  the name of the element to use as template for the email message. (maximum supported length is 100 chars)\n * `layout`: the name of the layout to be used to wrap email message\n * `format`: Type of template to use (html, text or both)\n * `headers`: A key-value list of headers to send in the email\n * `theme`: The View Theme to find the email templates\n * `config`: the name of the email config to be used for sending\n * `from_name`: String with from name. Must be supplied together with `from_email`.\n * `from_email`: String with from email. Must be supplied together with `from_name`.\n\n### Previewing emails\n\nIt is possible to preview emails that are still in the queue, this is very handy during development to check if the rendered\nemail looks at it should; no need to queue the email again, just make the changes to the template and run the preview again:\n\n\t# bin/cake EmailQueue.preview\n\n### Sending emails\n\nEmails should be sent using bundled Sender command, use `-h` modifier to\nread available options\n\n\t# bin/cake EmailQueue.sender -h\n\nYou can configure this command to be run under a cron or any other tool\nyou wish to use.\n\n# Contributing\n\n## Run the tests\n\n```\n./vendor/bin/phpunit tests/\n```\n\n## Check style\n```\n./vendor/bin/phpcs ./src ./tests/ --standard=vendor/cakephp/cakephp-codesniffer/CakePHP\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzo%2Fcakephp-email-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzo%2Fcakephp-email-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzo%2Fcakephp-email-queue/lists"}