{"id":19094994,"url":"https://github.com/phauthentic/email","last_synced_at":"2025-06-25T03:39:51.503Z","repository":{"id":101920925,"uuid":"157460812","full_name":"Phauthentic/email","owner":"Phauthentic","description":"Framework and library agnostic email sending - a fluid and strict typed interface for email sending","archived":false,"fork":false,"pushed_at":"2019-08-06T21:30:24.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T08:29:33.076Z","etag":null,"topics":["abstraction","adapter","email","oop","php-library","php7","wrapper"],"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/Phauthentic.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-11-13T23:25:55.000Z","updated_at":"2022-02-12T12:37:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5044e4e-c495-499d-b4ee-4eafd7357118","html_url":"https://github.com/Phauthentic/email","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Phauthentic/email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phauthentic%2Femail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phauthentic%2Femail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phauthentic%2Femail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phauthentic%2Femail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Phauthentic","download_url":"https://codeload.github.com/Phauthentic/email/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phauthentic%2Femail/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261800808,"owners_count":23211622,"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":["abstraction","adapter","email","oop","php-library","php7","wrapper"],"created_at":"2024-11-09T03:32:23.582Z","updated_at":"2025-06-25T03:39:51.479Z","avatar_url":"https://github.com/Phauthentic.png","language":"PHP","readme":"# Framework and library agnostic Email sending\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/Phauthentic/email/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Phauthentic/email/)\n[![Code Quality](https://img.shields.io/scrutinizer/g/Phauthentic/email/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Phauthentic/email/)\n\nMost email libraries are old and don't have what we consider a good interface, also we had the case that we needed to switch the underlying implementation. This library makes it both very convenient, it offers a [fluid](https://en.wikipedia.org/wiki/Fluent_interface) and strict typed interface to build emails and sending them through any mailer you want.\n\nThis library mostly implements just an email entity that is passed to a mailer that takes care of the actual email sending. It shouldn't be possible to create and send an email with an invalid state with this library.\n\n## Mailers supported out of the box\n\n* Swift Mailer (recommended)\n* PHPMailer\n\nOther included mailers:\n* mail() Mailer - a *very* simple implementation using [mail()](http://php.net/manual/de/function.mail.php)\n* Log Mailer - for testing, requires a [PSR3](https://github.com/php-fig/log) compatible logger\n* Null Mailer - for testing\n\n## How to use it\n\nAssuming you want to use this library with the Swift mailer:\n\n```sh\ncomposer require phauthentic/email\ncomposer require swiftmailer/swiftmailer\n```\n\n**Be aware that the library doesn't come with a default mailer library dependency! You MUST choose one that is supported!**\n\nA *simple* example:\n\n```php\nuse Phauthentic\\Email\\Email;\nuse Phauthentic\\Email\\EmailAddress;\nuse Phauthentic\\Email\\Mailer\\SwiftMailer;\nuse Swift_Mailer;\nuse Swift_SmtpTransport;\n\n$email = (new Email());\n    -\u003esetSender(new EmailAddress('me@test.com', 'Senders Name'))\n    -\u003eaddReceiver(new EmailAddress('you@test.com'))\n    -\u003esetSubject('A test')\n    -\u003esetTextContent('My text email')\n    -\u003esetHtmlContent('\u003cp\u003eMy HTML content\u003c/p\u003e');\n\n$mailer = new SwiftMailer(new Swift_Mailer(new Swift_SmtpTransport()));\n$mailer-\u003esend($email);\n$mailer-\u003esend($anotherEmail);\n$mailer-\u003esend($oneMore);\n```\n\n## Missing a feature?\n\nPlease open a feature type issue on Github with a detailed description and with an example of how to archive what you want in your mailer. Or even better: Create a pull request!\n\n## Copyright \u0026 License\n\nLicensed under the [MIT license](LICENSE.txt).\n\nCopyright (c) [Phauthentic](https://github.com/Phauthentic)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphauthentic%2Femail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphauthentic%2Femail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphauthentic%2Femail/lists"}