{"id":37232999,"url":"https://github.com/temp-mail-io/temp-mail-php","last_synced_at":"2026-01-15T03:51:53.228Z","repository":{"id":272190200,"uuid":"914942193","full_name":"temp-mail-io/temp-mail-php","owner":"temp-mail-io","description":"The official PHP Client for Temp Mail (temp-mail.io)","archived":false,"fork":false,"pushed_at":"2025-02-18T19:43:07.000Z","size":102,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-14T13:57:12.592Z","etag":null,"topics":["api","api-client","php","temp-mail"],"latest_commit_sha":null,"homepage":"","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/temp-mail-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2025-01-10T16:17:28.000Z","updated_at":"2025-08-28T17:26:58.000Z","dependencies_parsed_at":"2025-01-12T20:24:41.830Z","dependency_job_id":"7bbef37f-7495-4635-898e-1674329604cc","html_url":"https://github.com/temp-mail-io/temp-mail-php","commit_stats":null,"previous_names":["temp-mail-io/temp-mail-php"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/temp-mail-io/temp-mail-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temp-mail-io%2Ftemp-mail-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temp-mail-io%2Ftemp-mail-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temp-mail-io%2Ftemp-mail-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temp-mail-io%2Ftemp-mail-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temp-mail-io","download_url":"https://codeload.github.com/temp-mail-io/temp-mail-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temp-mail-io%2Ftemp-mail-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["api","api-client","php","temp-mail"],"created_at":"2026-01-15T03:51:52.614Z","updated_at":"2026-01-15T03:51:53.219Z","avatar_url":"https://github.com/temp-mail-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Temp Mail PHP Client\n![Packagist Version](https://img.shields.io/packagist/v/temp-mail-io/temp-mail-php)\n[![PHP](https://github.com/temp-mail-io/temp-mail-php/actions/workflows/ci.yml/badge.svg)](https://github.com/temp-mail-io/temp-mail-php/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\nThe **official PHP Client** for [Temp Mail](https://temp-mail.io). This library provides developers a straightforward way to create and manage temporary email addresses, retrieve and delete messages, all via the Temp Mail API.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage Examples](#usage-examples)\n    - [Listing Domains](#listing-domains)\n    - [Getting Rate Limits](#getting-rate-limits)\n    - [Creating Temporary Email](#creating-temporary-email)\n    - [Fetching and Deleting Messages](#fetching-and-deleting-messages)\n- [Testing](#testing)\n- [Contributing](#contributing)\n- [License](#license)\n- [Support](#support)\n\n## Features\n- **Create** temporary email addresses with optional domain specifications\n- **Get** current rate limits after API request\n- **Delete** a temporary email along with all its messages\n- **Retrieve** all messages for a specified email\n- **Get** a specific message or download its attachment\n\n## Installation\nTo install this PHP package, run:\n```bash\ncomposer require temp-mail-io/temp-mail-php\n```\n\n## Quick Start\nBelow is a simple example to get started:\n```php\n\u003c?php\n$emailClient = \\TempMailIo\\TempMailPhp\\Factory::createEmailClient('YOUR_API_KEY');\n\n$createResponse = $emailClient-\u003ecreate();\n\nif ($createResponse-\u003eerrorResponse !== null) {\n    echo \"Code: \" . $response-\u003eerrorResponse-\u003eerror-\u003ecode . PHP_EOL;\n    echo \"Detail: \" . $response-\u003eerrorResponse-\u003eerror-\u003edetail . PHP_EOL;\n    echo \"Type: \" . $response-\u003eerrorResponse-\u003eerror-\u003etype . PHP_EOL;\n    exit;\n}\n\n// Use the created temporary email on the website, service, etc...\n\n$messagesResponse = $emailClient-\u003egetMessages($createResponse-\u003esuccessResponse-\u003eemail);\n\nif ($messagesResponse-\u003eerrorResponse !== null) {\n    echo \"Code: \" . $messagesResponse-\u003eerrorResponse-\u003eerror-\u003ecode . PHP_EOL;\n    echo \"Detail: \" . $messagesResponse-\u003eerrorResponse-\u003eerror-\u003edetail . PHP_EOL;\n    echo \"Type: \" . $messagesResponse-\u003eerrorResponse-\u003eerror-\u003etype . PHP_EOL;\n    exit;\n}\n\nforeach ($messagesResponse-\u003esuccessResponse-\u003emessages as $message) {\n    // Iterate over messages\n}\n```\n\n## Usage Examples\n### Listing Domains\n```php\n$response = \\TempMailIo\\TempMailPhp\\Factory::createDomainClient('YOUR_API_KEY')-\u003egetAvailableDomains();\n\nif ($response-\u003eerrorResponse !== null) {\n    // handle error\n}\n\nforeach ($response-\u003esuccessResponse-\u003edomains as $domain) {\n    // Iterate over domains\n}\n```\n\n### Getting Rate Limits\n```php\n$response = \\TempMailIo\\TempMailPhp\\Factory::createRateLimitClient('YOUR_API_KEY')-\u003egetStatus();\n\nif ($response-\u003eerrorResponse !== null) {\n    // handle error\n}\n\necho \"Rate limit: \" . $response-\u003esuccessResponse-\u003elimit . PHP_EOL;\necho \"Remaining limit: \" . $response-\u003esuccessResponse-\u003eremaining . PHP_EOL;\necho \"Used limit: \" . $response-\u003esuccessResponse-\u003eused . PHP_EOL;\necho \"Reset limit: \" . $response-\u003esuccessResponse-\u003ereset . PHP_EOL;\n```\n\nYou can also get rate limits from each success response:\n```php\n$response = \\TempMailIo\\TempMailPhp\\Factory::createEmailClient('YOUR_API_KEY')-\u003ecreate();\n\nif ($response-\u003eerrorResponse !== null) {\n    // handle error\n}\n\necho \"Rate limit: \" . $response-\u003esuccessResponse-\u003erateLimit-\u003elimit . PHP_EOL;\necho \"Remaining limit: \" . $response-\u003esuccessResponse-\u003erateLimit-\u003eremaining . PHP_EOL;\necho \"Used limit: \" . $response-\u003esuccessResponse-\u003erateLimit-\u003eused . PHP_EOL;\necho \"Reset limit: \" . $response-\u003esuccessResponse-\u003erateLimit-\u003ereset . PHP_EOL;\n```\n\n### Creating Temporary Email\n```php\n$response = \\TempMailIo\\TempMailPhp\\Factory::createEmailClient('YOUR_API_KEY')-\u003ecreate();\n\nif ($response-\u003eerrorResponse !== null) {\n    // handle error\n}\n\necho \"Email: \" . $response-\u003esuccessResponse-\u003eemail . PHP_EOL;\n```\n\n### Fetching and Deleting Messages\n```php\n$emailClient = \\TempMailIo\\TempMailPhp\\Factory::createEmailClient('YOUR_API_KEY');\n\n$response = $emailClient-\u003egetMessages('your_email@example.com');\n\nif ($response-\u003eerrorResponse !== null) {\n    // handle error\n}\n\nforeach ($response-\u003esuccessResponse-\u003emessages as $message) {\n    // Iterate over messages\n}\n\n$messageClient = \\TempMailIo\\TempMailPhp\\Factory::createMessageClient('YOUR_API_KEY');\n\n$deleteResponse = $messageClient-\u003edelete($response-\u003esuccessResponse-\u003emessages[0]-\u003eid);\n\nif ($deleteResponse-\u003eerrorResponse !== null) {\n    // handle error\n}\n```\n\n## Testing\nWe use the PHPUnit testing framework.\n\nRun tests locally:\n```bash\n./vendor/bin/phpunit ./tests\n```\n\nIn the CI, the tests and linters are automatically executed via [GitHub Actions](https://github.com/temp-mail-io/temp-mail-php/actions).\n\n## Contributing\nWe welcome and appreciate contributions! Please see our CONTRIBUTING.md for guidelines on how to open issues, submit pull requests, and follow our coding standards.\n\n## License\nThis project is licensed under the MIT License.\n\n## Support\nIf you encounter any issues, please open [an issue](https://github.com/temp-mail-io/temp-mail-php/issues) on GitHub. We are happy to help you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemp-mail-io%2Ftemp-mail-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemp-mail-io%2Ftemp-mail-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemp-mail-io%2Ftemp-mail-php/lists"}