IMAP-powered library for effortlessly extracting valuable data from incoming emails. Streamline your email data processing with ease and efficiency.
I needed a simple way to send a webhook whenever a specific email is received, this simplifies things greatly and allows me to run the script on another thread to prevent blocking.
The script as it stands was made for me to listen for attachments only. This script allows subscribing to one email server, and launching a single webhook. Next update will allow multiple email servers, and multiple webhooks based on different filters.
This script requires Composer
- ext-mbstring
- ext-mcrypt
Edit "mailmine.json" with IMAP server connection details. Then select relevant filters.
Download this repo, ensure your PHP has the required extensions mentioned above.
Run:
composer install
Run
php main.php
to start the IMAP idle listener.
The from address, only listen for emails from this address.
Specify an array of attachment extensions to listen for, or leave blank.
The url to send a webhook to
N/A