An AngularJS / Laravel app - Keyword Based Email forwarder | read/write emails through IMAP

Last update: Aug 21, 2018

@MailTree

Simple mail forwarder.

Based on the specific email body/subject keywords forward mails to the list of predefined users.

Install

Imap

Install imap dependency.
apt-get install php5-imap

Add to the end of "php.ini" file.
extension=imap.so

Composer

cd to the root folder of tha app:
composer install
This will install all PHP dependencies.

grunt

cd to the the /public directory:
grunt install
This will install all javaScript dependencies.

Artisan Commands

Clean all emails from the DB:

./artisan email:clean

Read Emails:

./artisan email:read --html_enable=bool --email_search=string

Options:
--html_enable - Boolean(true/false) - which basically specifies if the email should include "HTML" tags or be only plain text.
--email_search - Read email based on it's state(see: ~Imap_search Values section below)

Send Emails:

./artisan email:send

Clean Dump Files

./artisan dumpFile:clean

@Imap_search Values

ALL - return all messages matching the rest of the criteria
ANSWERED - match messages with the \\ANSWERED flag set
BCC "string" - match messages with "string" in the Bcc: field
BEFORE "date" - match messages with Date: before "date"
BODY "string" - match messages with "string" in the body of the message
CC "string" - match messages with "string" in the Cc: field
DELETED - match deleted messages
FLAGGED - match messages with the \\FLAGGED (sometimes referred to as Important or Urgent) flag set
FROM "string" - match messages with "string" in the From: field
KEYWORD "string" - match messages with "string" as a keyword
NEW - match new messages
OLD - match old messages
ON "date" - match messages with Date: matching "date"
RECENT - match messages with the \\RECENT flag set
SEEN - match messages that have been read (the \\SEEN flag is set)
SINCE "date" - match messages with Date: after "date"
SUBJECT "string" - match messages with "string" in the Subject:
TEXT "string" - match messages with text "string"
TO "string" - match messages with "string" in the To:
UNANSWERED - match messages that have not been answered
UNDELETED - match messages that are not deleted
UNFLAGGED - match messages that are not flagged
UNKEYWORD "string" - match messages that do not have the keyword "string"
UNSEEN - match messages which have not been read yet

Examples

Login

ScreenShot

Keywords Page

ScreenShot

Mails Page

ScreenShot

Left Pane

ScreenShot

Copyright and License

Code and documentation copyright 2011-2014 @dud3(Dren Kajmakci). Code released under the GPLv2 license.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

GitHub

https://github.com/dud3/MailTree
Comments
  • 1. Keywords root page(functionality) - Basically Filters

    Description

    It seems that we might need a keywords root page.

    Samples

    Really basic idea(The root keywords). sample page 1 -clients - root groups


    Children keywords sample page 2 - sub groups of root

    There should be a better way to implement this.

    Reviewed by dud3 at 2014-12-04 02:10
  • 2. Main Page - Email addresses based grouped by keywords

    Basically list all the email_addresses that are associated by group of keyword(s) and list the based on grouped keywords.

    E.x.: _Key word group:_

    ID = 0 => {"0":"machine", "1":"robot", "2":"rocket"}
    ID = 1 => {"0":"desk", "1":"rat", "2":"mint"}
    ID = 2 => {"0":"GNU", "1":"tux", "2":"BSD"}
    

    _Email_addresses:_

    The list would be grouped based on the group of keywords...

    Reviewed by dud3 at 2014-10-09 02:27
  • 3. Read Emails (functionality) - Internal

    After reading the emails and and deciding based on keywords found on thesubjectof the mail against thekeywords assigned in the email address list` store the mail for further manipulation into the DB.

    Data to be store:

    • Sender address
    • Reviver address
    • Subject
    • Body
    • Additional info

    Probably more later...

    Reviewed by dud3 at 2014-10-08 12:06
  • 4. Deletion on item Search

    For some strange reason, when filtering an item on ng-repeat (if one item found) the whole array becomes that "found item" and $rootScope.keyWordsLists.splice(index, 1); takes the index of 0, when actually it's not.

    Write this instead:

    $scope.deleteWish = function (id) {
        var index = $scope.keyWordsLists.indexOf(id);
        if (index != -1) {
            $scope.keyWordsLists.splice(index, 1);
        }
    }
    

    Basically index in this case doesnt help.

    @besnik81 Any suggestions ?

    References

    • Code: https://github.com/dud3/MailTree/blob/master/public/scripts/controllers/keyWordsListCtrl.js#L255
    Reviewed by dud3 at 2014-12-08 01:17
  • 5. Send Emails command (functionality) - Internal

    After #15

    Get data:

    • Sender address
    • Reviver address
    • Subject
    • Body
    • Additional info

    Probably more later...

    Note

    One thing to concern about is that, do we want to send the mails automatically or does the user want to approve them first(such as change the body and/or title) and then send it.

    Reviewed by dud3 at 2014-10-08 12:12
  • 6. Emails Page(functionality)

    Description

    Functional side of the Emails page.

    Requirements

    • List Emails
    • Crate a new Emails
    • Edit Emails as whole
    • Add Email(s)
    • Edit Email(s)
    • Send Email individually
    • Delete Email Individually
    • Send Multiple emails at the same time
    • Delete Multiple emails at the same time
    • Mark sent emails
    • Show the date(number of the month)
    • If mails date is equal to current date => today...
    • Sort From newest to last
    • View email to be sent
    Reviewed by dud3 at 2014-11-09 21:02
  • 7. Keywords page(functionality)

    Description

    Functional side of the keywords page.

    Requirements

    • List keywordsList - Done
    • Crate a new keywordsList - Done
    • Edit keywordsList as whole - In Future
    • Add keyword(s) - Done
    • Edit keyword(s) - Done
    • Add email address list(s) - Done
    • Edit email address list(s) - Done
    • Auto-Scroll to the created element - Done
    • Change the show-hide on keywords-entity - Done
    • Ask on parent/child/sub-child... item deletion. - Done
    • Inline edit - Done
    • Delete recipients - Done
    • Auto-Scroll to the created element - Done
    • Keep original content of the Email - Done
    Reviewed by dud3 at 2014-11-09 00:46
Related tags
Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

PHP IMAP Initially released in December 2012, the PHP IMAP Mailbox is a powerful and open source library to connect to a mailbox by POP3, IMAP and NNT

Aug 8, 2022
Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols

Fetch Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols. Installing N.b. A note on Ubuntu 14.04 (probab

Jul 30, 2022
An IMAP library for PHP

Fetch Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols. Installing N.b. A note on Ubuntu 14.04 (probab

Jul 30, 2022
IMAP Library for PHP

IMAP Library for PHP Description PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled.

Aug 9, 2022
This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Aug 7, 2022
Magento 2 Email Catcher or Email Logger Module.

Magento 2 Module Experius email catcher / - logger

Dec 16, 2021
SendPortal - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more
SendPortal  - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more

SendPortal includes subscriber and list management, email campaigns, message tracking, reports and multiple workspaces/domains in a modern, flexible and scalable application.

Aug 5, 2022
Cross-language email validation. Backed by a database of over 38 000 throwable email domains.
Cross-language email validation. Backed by a database of over 38 000 throwable email domains.

Cross-language temporary (disposable/throwaway) email detection library. Covers 38038+ fake email providers.

Aug 4, 2022
Offer an online version of your Laravel emails to users.
Offer an online version of your Laravel emails to users.

This is was a collaborative project with Ryan Chandler. Please consider supporting him for the hard work he put into this package! Help support the ma

Aug 6, 2022
Store outgoing emails in Laravel
Store outgoing emails in Laravel

Record and view all sent emails Watch a video walkthrough https://www.youtube.com/watch?v=Oj_OF5n4l4k&feature=youtu.be Documentation and install instr

Aug 7, 2022
Mail Web is a Laravel package which catches emails locally for debugging
 Mail Web is a Laravel package which catches emails locally for debugging

Mail Web is a Laravel package which catches emails locally for debugging Installation Use the package manager composer to install Mail Web. composer r

Jul 27, 2022
Send beautiful HTML emails with Laravel
Send beautiful HTML emails with Laravel

Beautymail for Laravel Beautymail makes it super easy to send beautiful responsive HTML emails. It's made for things like: Welcome emails Password rem

Aug 13, 2022
Provides a clean and simple way to configure the WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice

WP PHPMailer provides a clean and simple way to configure the WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice.

Jul 21, 2022
CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.

CssToInlineStyles class Installation CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline style

Aug 11, 2022
The Mailer component helps sending emails

Mailer Component The Mailer component helps sending emails. Getting Started $ composer require symfony/mailer use Symfony\Component\Mailer\Transport;

Aug 8, 2022
Allows you to archive old emails from one Gmail mailbox to another Gmail mailbox

Gmail Archiver L'application Gmail archiver permet de déplacer automatiquement tous les vieux mails d'une boite Gmail vers une autre boite Gmail (ou é

Jan 27, 2022
Queue, preview and and send emails stored in the database.

Codeigniter4 email queue Queue, preview and and send emails stored in the database. This package provides an interface for creating emails on the fly

Apr 12, 2022
This application (class) does the sending of emails used in the phpmailer library

emailsender - PHP Notification library via email using phpMailer This library has the function of sending email using the phpmailer library. Doing thi

Feb 9, 2022
EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

Jul 27, 2022