EmailReader template - give your database an email address

EmailReader imports incoming email into your database, along with inline images and attachments. Use it in a CRM, help desk, or web-based email client. The template can read mail from IMAP accounts and Microsoft 365 work mailboxes, and extract text from PDF, Word, and image attachments. You can get this template for $50.

Buy now Live demo

If you are already own EmailReader template v1 or v2 you can upgrade to version 3 for $25.

Note: EmailReader template requires version 11.1 or better of PHPRunner or ASPRunner.NET.

Screenshots and live demos

List of imported email messages
Auto-responder settings

Changes history

Version 4.1 - October 2026

  • Added support for Microsoft 365 work mailboxes (Exchange Online) through Microsoft Graph
  • Added IMAP email retrieval in ASPRunner.NET

Version 4.0 - December 2025

  • Parsing of incoming doc, docx, pdf, bmp, gif, jpeg, jpg, png documents

Version 3.1 - November 2020

  • Added an option to download recent emails only (by number of days)
  • Added an option to download INBOX only or download from all folders (PHPRunner only)

Version 3 - April 2020

  • Added Auto-responders
  • Added custom functions to process incoming emails

Live demo

To see how it works send a test email to [email protected] and see it appear in the database. New emails are checked every five minutes. Make sure you are not sending anything confidential there.

Enter live demo

System requirements

  • EmailReader template requires version 11.1 or better of PHPRunner or ASPRunner.NET.
  • PHP version of EmailReader template requires PHP 5.4 or better
  • Supported databases are MySQL, SQL Server, MS Access, Postgre and Oracle

Setup instructions

1. Enable imap extension in php.ini. If you are on a shared web hosting check with your hosting company support if this extension is enabled already.

2. Proceed to mail_settings table and modify path to store attachments. This can be either relative or absolute path. Make sure web server user has write permissions on that folder.

3. Open Mail Servers and configure the incoming account. For a Microsoft 365 work mailbox, use the Outlook authentication tab. Set the interval between email checks in minutes.

4. Schedule a cron job to run getmail.php ( getmail for ASPRunner.NET i.e. https://website/project/getmail ) page every five or so minutes. If your website runs on Linux web server and you have access to crontab file you have two options here.

Method 1: Execute the script using php from the crontab

To execute cron.php every 5 minutes do the following:

Method 2: Run the php script using URL from the crontab

The URL to schedule is https://website/project/getmail.php. The following script executes the php script every 5 minutes by calling the URL using WGET. The -q option indicates quite mode. The "-O temp.txt" indicates that the output will be sent to the temporary file.

If you are not sure how to schedule a cron job open a free account with monitoring service like Montastic and add http://website/project/getmail.php URL to be pinged once a day or or once an hour.

Frequently asked questions

Can I use EmailReader template with ASPRunner.NET?

Yes. The template is available for both PHPRunner and ASPRunner.NET. The ASPRunner.NET version can retrieve email from IMAP accounts and Microsoft 365 work mailboxes directly.

Can I change the default number of email messages EmailReader retrieves?

You can proceed to business\EmailReader\source folder in project directory and modify getmail.php file. Here is the line that defines the maximum number of messages to retrieve:

How do I verify EmailReader template setup?

In order to test EmailReader template setup send a test email to one of incoming email addresses, wait for cron job to work (or open getmail.php manually in your browser), then see a new email message appear at the top of list.

For instance:

How can I execute some code when a new email arrives?

Proceed to Editor->Custom files and modify emailreader_custom.php file. You can use this function to send a custom autoreposnder or to parse email and store data in the database.