{"id":46569047,"url":"https://github.com/nixphp/mail","last_synced_at":"2026-03-07T08:02:47.286Z","repository":{"id":296446975,"uuid":"993426855","full_name":"nixphp/mail","owner":"nixphp","description":"NixPHP Mailer Plugin for quick email communication.","archived":false,"fork":false,"pushed_at":"2025-12-04T21:47:00.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-08T05:55:21.664Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nixphp.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,"zenodo":null}},"created_at":"2025-05-30T19:15:10.000Z","updated_at":"2025-12-03T21:58:33.000Z","dependencies_parsed_at":"2025-05-31T04:06:40.540Z","dependency_job_id":"2ae1889b-9c2a-4d96-a7f1-336d6f55e8bf","html_url":"https://github.com/nixphp/mail","commit_stats":null,"previous_names":["nixphp/mail"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nixphp/mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixphp%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixphp%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixphp%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixphp%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nixphp","download_url":"https://codeload.github.com/nixphp/mail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nixphp%2Fmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-07T08:02:46.538Z","updated_at":"2026-03-07T08:02:47.277Z","avatar_url":"https://github.com/nixphp.png","language":"PHP","readme":"\u003cdiv style=\"text-align: center;\" align=\"center\"\u003e\n\n![Logo](https://nixphp.github.io/docs/assets/nixphp-logo-small-square.png)\n\n[![NixPHP Mailer Plugin](https://github.com/nixphp/mailer/actions/workflows/php.yml/badge.svg)](https://github.com/nixphp/mailer/actions/workflows/php.yml)\n\n\u003c/div\u003e\n\n[← Back to NixPHP](https://github.com/nixphp/framework)\n\n---\n\n# nixphp/mail\n\n\u003e **A lightweight, extensible mailer system for NixPHP – with full transport abstraction and attachment support.**\n\nThis plugin provides a clean interface for sending emails in your NixPHP application. It includes a default `MailTransport` that uses PHP’s built-in `mail()` function, but can easily be swapped for SMTP, API-based services, or other custom transports.\n\n\u003e 🧩 Part of the official NixPHP plugin collection. Install it if you need flexible, framework-integrated email handling.\n\n---\n\n## 📦 Features\n\n- ✅ Compose and send emails with fluent API\n- ✅ Supports `To`, `Cc`, `Bcc`, `Reply-To`, and `Attachments`\n- ✅ Sends HTML or plain text\n- ✅ Fully transport-driven, extend, or swap backend logic\n- ✅ Ships with default `MailTransport` using native PHP `mail()`\n\n---\n\n## 📥 Installation\n\n```bash\ncomposer require nixphp/mail\n```\n\n---\n\n## 🚀 Usage\n\n### 📤 Basic mail sending\n\n```php\n$mail = mail()\n    -\u003esetFrom('hello@example.com')\n    -\u003eaddTo('john@example.com')\n    -\u003esetSubject('Hello from NixPHP')\n    -\u003esetContent('\u003cb\u003eWelcome!\u003c/b\u003e', true);\n\nmailer()-\u003esend($mail);\n```\n\n---\n\n### 📎 Add attachments\n\n```php\n$mail = mail()\n    -\u003esetFrom('info@example.com')\n    -\u003eaddTo('client@example.com')\n    -\u003esetSubject('Monthly Report')\n    -\u003eaddAttachment('report.pdf', '/path/to/report.pdf')\n\nmailer()-\u003esend($mail);\n```\n\nYou can also attach images inline and reference them via `cid:`:\n\n```php\n-\u003eaddAttachment('logo.png', '/path/to/logo.png', true)\n-\u003esetContent('\u003cimg src=\"cid:logo.png\"\u003e')\n```\n\n---\n\n### 🔄 Use a custom transport\n\nTo swap out the default `MailTransport`, inject your own:\n\n```php\nuse NixPHP\\Mail\\Mailer;\nuse App\\Mail\\MyCustomTransport;\n\n$mailer = new Mailer(new MyCustomTransport());\n$mail   = mail()-\u003eaddTo('john@example.com');\n$mailer-\u003esend($mail);\n```\n\nYour transport must implement:\n\n```php\nNixPHP\\Mail\\Core\\TransportInterface\n```\n\n---\n\n## ✅ Requirements\n\n* `nixphp/framework` \u003e= 0.1.0\n* PHP \u003e= 8.3\n\n---\n\n## 📄 License\n\nMIT License.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixphp%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixphp%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixphp%2Fmail/lists"}