{"id":18782397,"url":"https://github.com/atk4/outbox","last_synced_at":"2025-12-19T21:30:16.822Z","repository":{"id":33849913,"uuid":"120177237","full_name":"atk4/outbox","owner":"atk4","description":"Integrate ATK UI with transactional mail gateways","archived":false,"fork":false,"pushed_at":"2023-02-27T08:04:11.000Z","size":87,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2024-12-29T11:29:19.198Z","etag":null,"topics":["agile","atk4","outbox","php"],"latest_commit_sha":null,"homepage":"https://agiletoolkit.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atk4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-02-04T11:03:18.000Z","updated_at":"2022-01-28T00:10:53.000Z","dependencies_parsed_at":"2024-12-29T11:38:19.654Z","dependency_job_id":null,"html_url":"https://github.com/atk4/outbox","commit_stats":{"total_commits":6,"total_committers":3,"mean_commits":2.0,"dds":"0.33333333333333337","last_synced_commit":"9257bf112c45677387cd8b9850de1d05f0cf4ac0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Foutbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Foutbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Foutbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Foutbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atk4","download_url":"https://codeload.github.com/atk4/outbox/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699584,"owners_count":19682574,"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":["agile","atk4","outbox","php"],"created_at":"2024-11-07T20:35:51.639Z","updated_at":"2025-12-19T21:30:16.780Z","avatar_url":"https://github.com/atk4.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ATK4 Outbox\n\nMost web applications will need to communicate with the user. Following the task-centric approach, this add-on for ATK implements various components to help communicate with the user.\n\nThe basic idea is to avoid errors and provide only one way to use the component.\n\n\n### How to install\n`composer require atk4/outbox`\n\n### How to use with Atk4/Ui\n\nAdd the lines below after calling `$app-\u003einitLayout()`\n```php\n$app-\u003eadd([Outbox::class, [\n    'mailer' =\u003e new Sendmail(),\n    'model' =\u003e new Mail($this-\u003edb),\n]]);\n```\nAfter that you can call from any view `$this-\u003egetApp()-\u003egetOutbox()`\n\n### How to use without Atk4/Ui\n\nAdd the code below :\n```php\n$outbox = new Outbox([\n    'mailer' =\u003e new Sendmail(),\n    'model' =\u003e new Mail($this-\u003edb),\n]);\n```\nDue to missing App, init is not called so you have to do it you have to run it\n```php\n$outbox-\u003einvokeInit(); \n```\n\n### Mailer (PHMailer)\n\n - Sendmail\n - Gmail\n   - can be customized using Atk4 direct injection :\n     - username\n     - password\n - Smtp\n   - can be customized using Atk4 direct injection :\n     - debug = PHPMailer::DEBUG_OFF;\n     - auth = false\n     - host = 'localhost';\n     - port = 587;\n     - secure = PHPMailer::ENCRYPTION_*\n     - username\n     - password \n    \n### Extend Mailer\n\nWhatever your needs are you must respect only the contract provided by the `MailerInterface` interface.\nSo, any Traditional SMTP or API SMTP can be added only by create a new class and define \nthe method : `send(Mail $mail): MailResponse`, add to Outbox during initialization and use it.\n\nIf you create a new Mailer, feel free to open a PR.\n\n### How to use it\n``` php\n\n// request an new email from outbox  \n$mail = $outbox-\u003enew();\n\n// use an already saved mail template\n$mail-\u003ewithTemplateIdentifier('template_test');\n\n// replace token with data\n$mail-\u003ereplaceContent('token', 'Agile Toolkit');\n\n// Add a custom address as \"to\"\n$mail-\u003eref('to')-\u003ecreateEntity()-\u003esave([\n    'email' =\u003e 'destination@email.it',\n    'name' =\u003e 'destination',\n]);\n\n// send the mail and check the response \n$response = $outbox-\u003esend($mail);\n```\n\n#### TODO\n - Store the token present in a template, inside a field (at the moment, there is only a draft)\n - Add more helpers to the Mail template or create a controller to manipulate it and leave it simpler as a descriptor\n - Add a wysiwyg editor to edit individual templates (UI)\n - Add resend system for failed messages\n - Send SMS\n - If you have more ideas, feel free to open an issue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatk4%2Foutbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatk4%2Foutbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatk4%2Foutbox/lists"}