{"id":19250271,"url":"https://github.com/charcoalphp/email","last_synced_at":"2026-06-12T22:33:11.930Z","repository":{"id":37492348,"uuid":"505906080","full_name":"charcoalphp/email","owner":"charcoalphp","description":"[READ-ONLY] Charcoal email sending (with phpmailer) and queue management.","archived":false,"fork":false,"pushed_at":"2024-03-13T15:05:14.000Z","size":1337,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T16:34:23.935Z","etag":null,"topics":["email","email-sender","php","phpmailer","queue","read-only-repository"],"latest_commit_sha":null,"homepage":"https://github.com/charcoalphp/charcoal","language":"PHP","has_issues":false,"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/charcoalphp.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,"publiccode":null,"codemeta":null}},"created_at":"2022-06-21T15:43:49.000Z","updated_at":"2022-06-21T19:25:00.000Z","dependencies_parsed_at":"2024-01-13T04:49:49.530Z","dependency_job_id":"1a2a35dd-92cf-47f1-8e1a-987f72957f6d","html_url":"https://github.com/charcoalphp/email","commit_stats":{"total_commits":159,"total_committers":10,"mean_commits":15.9,"dds":0.5157232704402516,"last_synced_commit":"215702447b68cb4547f46d55af274e1f4a8a9255"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/charcoalphp/email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Femail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Femail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Femail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Femail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charcoalphp","download_url":"https://codeload.github.com/charcoalphp/email/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Femail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34265491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["email","email-sender","php","phpmailer","queue","read-only-repository"],"created_at":"2024-11-09T18:16:41.016Z","updated_at":"2026-06-12T22:33:11.909Z","avatar_url":"https://github.com/charcoalphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Charcoal Email\n==============\n\nThe Email package provides an integration with [PHPMailer] for sending emails.\n\n## Installation\n\n```shell\ncomposer require charcoal/email\n```\n\nFor Charcoal projects, the service provider can be registered from your configuration file:\n\n```json\n{\n    \"service_providers\": {\n        \"charcoal/email/service-provider/email\": {}\n    }\n}\n```\n\n## Usage\n\n```php\nuse Charcoal\\Email\\ServiceProvider\\EmailServiceProvider;\nuse Pimple\\Container;\n\n$container = new Container();\n$container-\u003eregister(new EmailServiceProvider());\n\n$email = $container['email'];\n$email-\u003esetData([\n    'from' =\u003e '\"Company inc.\" \u003ccompany.inc@example.com\u003e',\n    'bcc'  =\u003e 'shadow@example.com',\n    'to'   =\u003e [\n        'recipient@example.com',\n        '\"Some guy\" \u003csomeguy@example.com\u003e',\n        [\n            'name'  =\u003e 'Other guy',\n            'email' =\u003e 'otherguy@example.com',\n        ],\n    ],\n    'reply_to' =\u003e [\n        'name'  =\u003e 'Jack CEO',\n        'email' =\u003e 'jack@example.com'\n    ],\n    'subject'        =\u003e $this-\u003etranslator-\u003etrans('Email subject'),\n    'campaign'       =\u003e 'Campaign identifier',\n    'template_ident' =\u003e 'foo/email/default-email'\n    'attachments'    =\u003e [\n        'foo/bar.pdf',\n        'foo/baz.pdf',\n    ],\n]);\n\n// Dispatch immediately:\n$email-\u003esend();\n\n// Alternately, dispatch at a later date using the queue system:\n$email-\u003equeue('in 5 minutes');\n```\n\n### Email Config\n\nThe entire email system can be configured from the main app config, in the `email` config key.\n\n```json\n{\n    \"email\": {\n        \"smtp\": true,\n        \"smtp_hostname\": \"smtp.example.com\",\n        \"smtp_port\": 25,\n        \"smtp_security\": \"tls\",\n        \"smtp_username\": \"user@example.com\",\n        \"smtp_password\": \"password\",\n\n        \"default_from\": \"webproject@example.com\",\n        \"default_reply_to\": \"webproject@example.com\",\n        \"default_track\": false,\n        \"default_log\": true\n    }\n}\n```\n\n### Service Provider\n\nAll email services can be quickly registered to a service container with `\\Charcoal\\Email\\ServiceProvider\\EmailServiceProvider`.\n\n**Provided services:**\n\n| Service           | Type                           | Description |\n| ----------------- | ------------------------------ | ----------- |\n| **email**         | `Email`\u003csup\u003e[1]\u003c/sup\u003e            | An email object (factory).\n| **email/factory** | `FactoryInterface`\u003csup\u003e[2]\u003c/sup\u003e | An email factory, to create email objects.\n\nNotes:\n\n* \u003csup\u003e[1]\u003c/sup\u003e `\\Charcoal\\Email\\Email`.\n* \u003csup\u003e[2]\u003c/sup\u003e `Charcoal\\Factory\\FactoryInterface`.\n\n\nAlso available are the following helpers:\n\n| Helper Service    | Type                        | Description |\n| ----------------- | --------------------------- | ----------- |\n| **email/config**  | `EmailConfig`\u003csup\u003e[3]\u003c/sup\u003e   | Email configuration.\n| **email/view**    | `ViewInterface`\u003csup\u003e[4]\u003c/sup\u003e | The view object to render email templates (`$container['view']`).\n\nNotes:\n\n* \u003csup\u003e[3]\u003c/sup\u003e `\\Charcoal\\Email\\EmailConfig`.\n* \u003csup\u003e[4]\u003c/sup\u003e `\\Charcoal\\View\\ViewInterface`.\n\n## Resources\n\n* [Contributing](https://github.com/charcoalphp/.github/blob/main/CONTRIBUTING.md)\n* [Report issues](https://github.com/charcoalphp/charcoal/issues) and\n  [send pull requests](https://github.com/charcoalphp/charcoal/pulls)\n  in the [main Charcoal repository](https://github.com/charcoalphp/charcoal)\n\n[PHPMailer]: https://github.com/PHPMailer/PHPMailer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Femail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharcoalphp%2Femail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Femail/lists"}