Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Monitored Emails

LicenseStableDownloadsPHPIssuesMerge Requests

Description

Monitored Emails connects IMAP or POP inboxes to Laravel Enso and persists unread messages for further application processing.

The package exposes CRUD screens for mailbox configuration, validates remote connectivity from the backoffice, and schedules a recurring fetch cycle that stores unseen messages in the local database.

It is intended for Enso applications that ingest customer or operational inboxes and then continue processing from persisted messages instead of polling mailboxes ad hoc.

Installation

Install the package:

composer require laravel-enso/monitored-emails

Run the package migrations:

php artisan migrate

Features

  • Mailbox CRUD, table init, table data, and Excel export endpoints.
  • Connectivity test endpoint for validating server, folder, and credentials before saving changes.
  • Scheduled enso:monitored-emails:fetch-unread-emails command registered every fifteen minutes.
  • Queue-backed unread message ingestion through the FetchUnreadEmails job.
  • Protocol enum for imap, secureImap, pop3, and smtp, with default ports.
  • Encrypted password storage on the monitored mailbox model.

Usage

Configure one or more monitored inboxes from the administration UI and enable them with the is_active flag.

Main route group:

  • administration.monitoredEmails.*

The package schedules unread-message polling automatically. You can also trigger the fetch manually:

php artisan enso:monitored-emails:fetch-unread-emails

Each configured mailbox resolves an IMAP client through webklex/php-imap, reads unseen messages from the selected folder, stores the raw message metadata in monitored_messages, and marks the remote message as seen.

API

HTTP routes

  • GET api/administration/monitoredEmails/create
  • POST api/administration/monitoredEmails
  • GET api/administration/monitoredEmails/{monitoredEmail}/edit
  • PATCH api/administration/monitoredEmails/{monitoredEmail}
  • DELETE api/administration/monitoredEmails/{monitoredEmail}
  • GET api/administration/monitoredEmails/initTable
  • GET api/administration/monitoredEmails/tableData
  • GET api/administration/monitoredEmails/exportExcel
  • POST api/administration/monitoredEmails/{monitoredEmail}/testEmail

Artisan commands

  • enso:monitored-emails:fetch-unread-emails

Queue job

  • LaravelEnso\\MonitoredEmails\\Jobs\\FetchUnreadEmails

Behavior:

  • loads all active monitored inboxes
  • connects to each configured mailbox
  • fetches unseen messages from the selected folder
  • stores persisted message copies locally
  • marks remote messages as seen after import

Depends On

Required Enso packages:

  • laravel-enso/core ↗

Required external packages:

  • webklex/php-imap ↗

Companion frontend package:

  • @enso-ui/monitored-emails ↗

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

Edit this page on GitHub
Last Updated: 4/20/2026, 6:08:03 PM
Prev
Migrator
Next
Notifications