{"id":16060782,"url":"https://github.com/geerlingguy/imap","last_synced_at":"2025-03-16T07:32:34.708Z","repository":{"id":4751187,"uuid":"5901053","full_name":"geerlingguy/Imap","owner":"geerlingguy","description":"Simple wrapper class for PHP's IMAP-related email functions.","archived":false,"fork":false,"pushed_at":"2023-07-10T23:03:33.000Z","size":50,"stargazers_count":59,"open_issues_count":0,"forks_count":34,"subscribers_count":9,"default_branch":"1.x","last_synced_at":"2025-02-27T05:51:13.530Z","etag":null,"topics":["email","imap","library","mail","packagist","php","php-imap","wrapper"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/geerlingguy/imap","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"djalexd/code-fellow","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2012-09-21T12:31:14.000Z","updated_at":"2024-05-23T16:12:35.000Z","dependencies_parsed_at":"2022-09-15T13:20:51.472Z","dependency_job_id":"878af008-d2b0-4dcd-8841-3688399483c6","html_url":"https://github.com/geerlingguy/Imap","commit_stats":{"total_commits":41,"total_committers":3,"mean_commits":"13.666666666666666","dds":0.07317073170731703,"last_synced_commit":"6adf151f414714a9977b9529602db01521176843"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2FImap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2FImap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2FImap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2FImap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/Imap/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806052,"owners_count":20350775,"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":["email","imap","library","mail","packagist","php","php-imap","wrapper"],"created_at":"2024-10-09T04:06:22.653Z","updated_at":"2025-03-16T07:32:34.406Z","avatar_url":"https://github.com/geerlingguy.png","language":"PHP","funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/geerlingguy/Imap/1.x/Resources/Imap-Logo.png\" alt=\"IMAP for PHP Logo\" /\u003e\n\n# Imap\n\nA PHP wrapper class for PHP's IMAP-related email handling functions.\n\nThis class includes many convenience methods to help take the headache out of\ndealing with emails in PHP. For example, email handling method names make more\nsense (e.g. `getMessage`, `deleteMessage`, and `moveMessage` along with a\nmessage id, rather than passing around IMAP streams, using many\ndifficult-to-remember `imap_*` functions).\n\nAlso, this class adds some convenient helpful information to emails, like the\nfull message header (in `raw_header`), and whether or not the email was sent by\nan autoresponder (see `detectAutoresponder` for details).\n\nIf you have any issues or feature suggestions, please post a new issue on\nGitHub.\n\n## Usage\n\nConnect to an IMAP account by creating a new Imap object with the required\nparameters:\n\n```php\n$host = 'imap.example.com';\n$user = 'johndoe';\n$pass = '12345';\n$port = 993;\n$ssl = true;\n$folder = 'INBOX';\n$mailbox = new Imap($host, $user, $pass, $port, $ssl, $folder);\n```\n\nGet a list of all mailboxes:\n\n```php\n$mailbox-\u003egetMailboxInfo();\n```\n\nGet an array of message counts (recent, unread, and total):\n\n```php\n$mailbox-\u003egetCurrentMailboxInfo();\n```\n\nGet an associative array of message ids and subjects:\n\n```php\n$mailbox-\u003egetMessageIds();\n```\n\nLoad details for a message by id.\n\n```php\n$id = 2;\n$mailbox-\u003egetMessage($id);\n```\n\nDelete a message by id.\n\n```php\n$id = 2;\n$mailbox-\u003edeleteMessage($id);\n```\n\nDisconnect from the server (necessary after deleting or moving messages):\n\n```php\n$mailbox-\u003edisconnect();\n```\n\nMore methods and documentation can be found in the Imap.php class file.\n\n## License\n\nImap is licensed under the MIT (Expat) license. See included LICENSE.md.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fimap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fimap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fimap/lists"}