Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Fapro | 1,374 | 5 months ago | 7 | Python | ||||||
Fake Protocol Server | ||||||||||
Pop | 1,319 | 77 | a month ago | 206 | August 10, 2021 | 97 | mit | Go | ||
A Tasty Treat For All Your Database Needs | ||||||||||
Fizz | 131 | 115 | 89 | 8 months ago | 62 | July 09, 2022 | 21 | mit | Go | |
A Common DSL for Migrating Databases | ||||||||||
Kmq_discord | 36 | a day ago | 21 | gpl-3.0 | TypeScript | |||||
The most popular K-pop song guessing game on the internet, with over 600,000 games played and 100,000 unique players! | ||||||||||
Postfixadmin Installer | 21 | 4 years ago | 14 | mit | Perl | |||||
Script to install a Postfix/Dovecot/Mysql system and the postfixadmin web UI | ||||||||||
2019 06 | 20 | 3 years ago | 6 | mit | JavaScript | |||||
📮 우리들의 이메일 서비스, 다잇누! | ||||||||||
Php Imap Fetcher | 10 | 5 years ago | 3 | PHP | ||||||
Open source PHP to fetch or pipe email from a POP box, save the message to MySQL, and save attachments/images locally. | ||||||||||
Smart.framework | 8 | 20 days ago | other | PHP | ||||||
Smart Framework - A High Performance PHP / Javascript Framework for Web Projects | ||||||||||
Realmpop | 7 | 4 years ago | 2 | PHP | ||||||
Realm Pop shows you population statistics on the players' characters in World of Warcraft. | ||||||||||
Docker Postfix | 2 | 4 days ago | 1 | mit | Shell | |||||
Docker image, Postfix (Dovecot) mail server: SMTP, IMAP, POP3, LDAP, MySQL. ENV configuration. Demo included. |
PHP IMAP 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.
The script has been tested on emails sent from Gmail, Outlook, Yahoo, Apple Mail, Mozilla Thunderbird, and others.
Navigate to the folder on your server where you want to run the script.
Create a folder called "files" and make sure it's writable by the web server.
In your MySQL database, create the tables "emails" and "files" by importing the file:
You 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.
The script is set to "fetch" by default but you can change it to "pipe" in config.php
There are flags set by default in config.php but you can change them by referencing:
http://php.net/manual/en/function.imap-open.php
The file to either pipe to or run as a cron job is application.php
When 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 "files" folder. Attachments will be saved there.
Reference to images is only saved in the "text-html" part of the message, and not the "text-plain."
Images are referenced like:
[filePath]/dkvmbY14NZr4l4eb79Gs1513724817/mypicture.png
When 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:
[example.com]/application/files/dkvmbY14NZr4l4eb79Gs1513724817/mypicture.png
then your code will be
$str = str_replace("[filePath]","/application/files",$str);