{"id":41214928,"url":"https://github.com/phore/phore-mail","last_synced_at":"2026-01-22T23:58:38.752Z","repository":{"id":57039230,"uuid":"142276909","full_name":"phore/phore-mail","owner":"phore","description":"Sending mails using text-template","archived":false,"fork":false,"pushed_at":"2023-06-26T17:26:46.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-02T19:15:55.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://infracamp.org/phore/","language":"Shell","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/phore.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}},"created_at":"2018-07-25T09:17:49.000Z","updated_at":"2022-05-18T15:32:10.000Z","dependencies_parsed_at":"2023-02-09T03:01:11.419Z","dependency_job_id":null,"html_url":"https://github.com/phore/phore-mail","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/phore/phore-mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phore%2Fphore-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phore%2Fphore-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phore%2Fphore-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phore%2Fphore-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phore","download_url":"https://codeload.github.com/phore/phore-mail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phore%2Fphore-mail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28675276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T20:48:19.482Z","status":"ssl_error","status_checked_at":"2026-01-22T20:48:14.968Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-01-22T23:58:38.203Z","updated_at":"2026-01-22T23:58:38.743Z","avatar_url":"https://github.com/phore.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phore Mail\n\nA template wrapper around the famous *[PHPMailer](https://github.com/PHPMailer/PHPMailer)*\nMailer class and the *[text/template](https://github.com/dermatthes/text-template)* template system.\n\n- Single Class\n- Multipart Mime \n- Testing using [mailtrap.io](https://mailtrap.io)\n\n## Demo template\n\n```\n{mail to=\"abc@abc.de\" name=\"Some Name\"}\n{mail from=\"sender@address.de\" name=\"Me\"}\n{mail cc=\"mail@email\" name=\"Some Name\"}\n{mail bcc=\"mail@email\" name=\"Some Name\"}\n{subject}Hello {=name} - You are the welcome{/subject}\n\n{html}\n    \u003cbody\u003e\n        \u003cb\u003eHello {= name}\u003c/b\u003e,\n        \u003cp\u003e\n            This HTML Mime Mail\n        \u003c/p\u003e\n    \u003c/body\u003e\n{/html}\n\nHello {= name},\n\nThis is the alternative Text body\n```\n\n## Available mail parameters\n\n\n| Parameter | Name | Default |\n|-----------|------|---------|\n| `charset` | |\n| `to` ||\n| `from` ||\n| `cc` ||\n| `bcc` ||\n\n## Script for sending a mail\n\nWith auto-failover to second SMTP-Server.\n\n```php\n$mailer = new PhoreMailer();\n$mailer-\u003econfig([\n    \"Host\"      =\u003e \"smtp1.example.org;smtp2.example.org\",\n    \"Username\"  =\u003e \"user@example.org\",\n    \"Password\"  =\u003e \"secret\", \n    \"SMTPAuth\"  =\u003e true\n]);\n$mailer-\u003esend($templateText, [\"name\"=\u003e\"Joe Doe\"]);\n```\n\n## Installation\n\n```\ncomposer require phore/mail\n```\n\n## Configuring PHPMailer / text-template\n\n```php\n$mailer = new PhoreMailer();\n$mailer-\u003ephpmailer-\u003ephpMailerFunction();\n```\n\n```php\n$mailer = new PhoreMailer();\n$mailer-\u003etextTemplate-\u003etextTemplateFunction();\n```\n\n\n## Sending mail without mailserver using SMTP\n\n\u003e This method is for testing only. Most Mailservers will\n\u003e reject mail transferred with this method.\n\n```\n\n```\n\n\n## Demos\n\n- [Basic/simple template sending mail](docs/simple-demo.php)\n- [SMTP Auth](docs/smtp-auth-demo.php)\n- [Setting charset](docs/setting-charset.php)\n\n## Debugging\n\nInstead of sending the mail, you can retrieve the PHPMailer\ninstance by calling `prepare()`. \n\n```\n$phpmail = $phoreMailer-\u003eprepare($template,[]);\nprint_r ($phpmail);\n$phpmail-\u003eSend();\n```\n\n## Intercepting outgoing mail\n\n```php\n$mailer-\u003esetSendMailFunction(function (PHPMailer $mail, PhoreMailer $phoreMailer) {\n     $res[\"to\"] = $mail-\u003egetAllRecipientAddresses();\n     $res[\"subject\"] = $mail-\u003eSubject;\n     $res[\"html\"] = $mail-\u003eBody;\n     $res[\"text\"] = $mail-\u003eAltBody;\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphore%2Fphore-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphore%2Fphore-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphore%2Fphore-mail/lists"}