{"id":20934776,"url":"https://github.com/kenvilar/php-imap-piper-fetcher","last_synced_at":"2026-04-12T08:32:23.751Z","repository":{"id":68522955,"uuid":"237151817","full_name":"kenvilar/PHP-IMAP-Piper-Fetcher","owner":"kenvilar","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-13T00:17:10.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T20:14:37.132Z","etag":null,"topics":["attachments","email","fetch","imap","mysql","php","pipe","pop3","text-html"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenvilar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-01-30T06:19:17.000Z","updated_at":"2025-02-27T14:24:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"850a7c21-cd2d-4022-9ab2-590bb56a9f4a","html_url":"https://github.com/kenvilar/PHP-IMAP-Piper-Fetcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kenvilar/PHP-IMAP-Piper-Fetcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenvilar%2FPHP-IMAP-Piper-Fetcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenvilar%2FPHP-IMAP-Piper-Fetcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenvilar%2FPHP-IMAP-Piper-Fetcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenvilar%2FPHP-IMAP-Piper-Fetcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenvilar","download_url":"https://codeload.github.com/kenvilar/PHP-IMAP-Piper-Fetcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenvilar%2FPHP-IMAP-Piper-Fetcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31709293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"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":["attachments","email","fetch","imap","mysql","php","pipe","pop3","text-html"],"created_at":"2024-11-18T22:11:11.869Z","updated_at":"2026-04-12T08:32:23.723Z","avatar_url":"https://github.com/kenvilar.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP IMAP Piper Fetcher\nPHP IMAP Piper Fetcher is an open source PHP script that can fetch or pipe emails from a POP box, save the message to MySQL (both text-plain and text-html), and save attachments/images locally.\n\n# Compatibility\nThe script has been tested on emails sent from Gmail, Outlook, Yahoo, Apple Mail, Mozilla Thunderbird, and others.\n\n# Installing\nNavigate to the folder on your server where you want to run the script.\n\n1. Upload the files:\n* application.php\n* class.php\n* config.php\n* mimeDecode.php\n\n2. Create a folder called \"results\" and make sure it's writable by the web server.\n\n3. In your MySQL database, create the tables \"emails\" and \"files\" by importing the file:\n* mysql-structure.sql\n\n4. Open the file config.php and add your MySQL and POP credentials.\n\n# Pipe vs Fetch\nYou can either pipe an email address to the script to process each email as it arrives, or you can fetch emails one-by-one from a mailbox using a cron job (emails are deleted as they're processed.) We recommend using the fetch method.\n\nThe script is set to \"fetch\" by default but you can change it to \"pipe\" in config.php\n\n# IMAP Flags\nThere are flags set by default in config.php but you can change them by referencing:\n\nhttp://php.net/manual/en/function.imap-open.php\n\n# Running the script\nThe file to either pipe to or run as a cron job is application.php\n\n# Referencing attachments/images\nWhen an email is processed, a unique ID will be generated for the MySQL record and if any attachments are present, a folder for that ID will be created in your \"results\" folder. Attachments will be saved there.\n\nReference to images is only saved in the \"text-html\" part of the message, and not the \"text-plain.\"\n\nImages are referenced like:\n\n[filePath]/dkvmbY14NZr4l4eb79Gs1513724817/mypicture.png\n\nWhen including the message in your own application you'll simply replace \"[filePath]\" with the relevant folder path, for example, if the path to your files is:\n\n[example.com]/application/results/dkvmbY14NZr4l4eb79Gs1513724817/mypicture.png\n\nthen your code will be\n\n$str = str_replace(\"[filePath]\",\"/application/results\",$str);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenvilar%2Fphp-imap-piper-fetcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenvilar%2Fphp-imap-piper-fetcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenvilar%2Fphp-imap-piper-fetcher/lists"}