PHP Classes

PHP Email To DB: Retrieve e-mail messages into a MySQL database

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (27)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 8,546 All time: 193 This week: 63Up
Version License Categories
etodb 1.0.0FreewareEmail, Databases


This class can retrieve messages from a mailbox and insert them into a MySQL database.

The class retrieves and parses messages from a mailbox using the PHP IMAP extension.

The parsed messages can be stored in a MySQL database table. Message attachments are stored in server files.

The class can also perform some basic spam checking on the retrieved messages by verifying the sender address against a blacklist, and verify the existence of banned words in the message subject or body. The sender blacklist and banned words are also stored in the database tables.

The message processing activity is logged in a separate database table.

The class can also retrieve the messages and logged actions from the database.

Innovation Award
PHP Programming Innovation award winner
August 2006

Prize: One downloadable copy of Komodo Pro
Manipulating e-mail messages and accessing databases have been some of the most popular uses of PHP.

This class provides a solution to retrieve e-mail messages into a MySQL database table, so they can be searched and manipulated in a more convenient way by PHP applications.

Manuel Lemos
Picture of Ernest Wojciuk
Name: Ernest Wojciuk <contact>
Classes: 1 package by
Country: Poland Poland
Age: 42
All time rank: 3026 in Poland Poland
Week rank: 290 Up6 in Poland Poland Equal
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  • Schema
  Files folder image Files  
File Role Description
Plain text file emailtodb_v0.9.sql Data SQL
Plain text file class.emailtodb.php Class PHPLIB version
Plain text file example_1_class Example Configured class
Plain text file class.emailtodb_v0.9.php Class Class
Plain text file example_1_index Example Index file
Plain text file example_1_sql Example SQL source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:193
This week:63Up
User Ratings User Comments (7)
 All time
Bardzo przydatne i dob&#380;e zrobione skrypty.
9 years ago (66damian66)
This is excellent! I will add a few notes to help others use it.
13 years ago (Lil Peck)
10 years ago (James Munyan)
the maysql tablestruktur is a bit to sinple for heavy use .
12 years ago (Hartmut Rothgänger)
Found it very useful and easy to use
12 years ago (Josephat Kyando)
a very fine tool
14 years ago (neuhardt)
Very good work !! But: The var $message_id was not defined, s...
15 years ago (bartolotta)