{"id":25083608,"url":"https://github.com/ahmedghanem00/tempmail-api-client","last_synced_at":"2025-04-01T11:34:49.071Z","repository":{"id":229240889,"uuid":"775757552","full_name":"ahmedghanem00/tempmail-api-client","owner":"ahmedghanem00","description":"An API client for Temp-Mail service ( https://rapidapi.com/Privatix/api/temp-mail )","archived":false,"fork":false,"pushed_at":"2024-06-15T14:06:12.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T06:30:07.236Z","etag":null,"topics":["api-client","api-client-php","disposable-email","php","temporary-email"],"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/ahmedghanem00.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":"2024-03-22T01:35:50.000Z","updated_at":"2024-05-18T07:52:14.000Z","dependencies_parsed_at":"2024-05-18T08:31:03.233Z","dependency_job_id":"421dd08d-390e-4388-a0ad-614a93951be8","html_url":"https://github.com/ahmedghanem00/tempmail-api-client","commit_stats":null,"previous_names":["ahmedghanem00/tempmail-api-client"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedghanem00%2Ftempmail-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedghanem00%2Ftempmail-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedghanem00%2Ftempmail-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedghanem00%2Ftempmail-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedghanem00","download_url":"https://codeload.github.com/ahmedghanem00/tempmail-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246634422,"owners_count":20809239,"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":["api-client","api-client-php","disposable-email","php","temporary-email"],"created_at":"2025-02-07T06:28:45.059Z","updated_at":"2025-04-01T11:34:49.050Z","avatar_url":"https://github.com/ahmedghanem00.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TempMail API Client\n\nAn API client for Temp-Mail service ( https://rapidapi.com/Privatix/api/temp-mail )\n\n## Installation\n\n````\ncomposer require ahmedghanem00/tempmail-api-client\n````\n\n## Usage\n\n#### Client Initialization :\n\n````php\nuse ahmedghanem00\\TempMailClient\\Client;\n\n$client = new Client('YOUR_API_TOKEN');\n````\n\n#### Get Available Domains\n\nRetrieve a fresh data from the server:\n\n````php\n$client-\u003eretrieveMailDomains();\n````\n\nGet the cached domains in the client (Domains are cached when client initialized for the first time)\n\n````php\n$client-\u003egetCachedMailDomains();\n````\n\n#### Generate a Random Email\n\n````php\n$receiver = $client-\u003egenerateFullyRandomReceiver();\n## OR\n$receiver = $client-\u003egenerateRandomReceiverFromEmailName(\"my-random-email\");\n\necho $receiver-\u003egetFullEmailAddress(); // string \"bdmhnjbtyj@nuclene.com\" OR \"my-random-email@nuclene.com\"\necho $receiver-\u003egetEmailName(); // string \"bdmhnjbtyj\" OR \"my-random-email\"\necho $receiver-\u003egetEmailDomain(); // string \"nuclene.com\"\n````\n\n#### Get email messages\n\n````php\n$messages = $receiver-\u003einbox()-\u003eretrieveAll();\n\n/* @var $message \\ahmedghanem00\\TempMailClient\\Model\\Message */\nforeach ($messages as $message) {\n    echo $message-\u003egetSubject(); // string\n    echo $message-\u003egetText(); // string\n    \n    echo $message-\u003egetSenderName(); // string \"Joe\"\n    echo $message-\u003egetSenderEmail(); // string\n    \n    echo $message-\u003egetReceiveTimestamp(); // float\n    echo $message-\u003egetHtml(); // string\n    echo $message-\u003egetPreview(); // string\n    \n    # Message id\n    echo $message-\u003egetServiceInternalId(); // string\n    \n    /* @var $attachment \\ahmedghanem00\\TempMailClient\\Model\\Attachment */\n    foreach ($message-\u003egetAttachments() as $attachment) {\n        echo $attachment-\u003egetName(); // string\n        echo $attachment-\u003egetContentType(); // string\n        echo $attachment-\u003egetSize(); // int\n        echo $attachment-\u003egetContent(); // string\n    }\n    \n}\n````\n\n#### Retrieve a Specific Message\n\n````php\n$message = $receiver-\u003einbox()-\u003eretrieveMessage(MessageId: \"dk4kdkmv\");\n````\n\n#### Delete a Specific Message\n\n````php\n$receiver-\u003einbox()-\u003edeleteMessage(MessageId: \"dk4kdkmv\");\n````\n\n## LICENSE\n\nPackage is licensed under the [MIT License](http://opensource.org/licenses/MIT). For more info, You can take a look at the [License File](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedghanem00%2Ftempmail-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedghanem00%2Ftempmail-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedghanem00%2Ftempmail-api-client/lists"}