Giter Site home page Giter Site logo

mailtree's Introduction

@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/>.

mailtree's People

Contributors

dud3 avatar dud32 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mailtree's Issues

Mail - to - DB

Description

Read mails from the server, store into DB.

Fix .htaccess on remote server

Fix the main .htaccess on the remote server, since it will keep on throwing 404 for all the routes that we actually have.

References

#13

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...

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.

Extra new Line - Email Body

Clean up the extra New line on email body.

This accrues when replacing the original Dear X person... which the name of people that the mail is going to be forwarded to.

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

SQL schema/structure

Description

Create a database called e_fwd.

Schema

Really simple schema(at least for now).
Basically Every email in email_address_list contains keyword(s), if the keywords match from the incoming email(such as from the gmail account), then store into the mails table, and from there to the email_address that they belong to.
e_fwd_db_scheme

Tables

CREATE TABLE IF NOT EXISTS `email_address_list`;
CREATE TABLE IF NOT EXISTS `mails`;
CREATE TABLE IF NOT EXISTS `groups`;
CREATE TABLE IF NOT EXISTS `keywords_list;`
CREATE TABLE IF NOT EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `throttle`;
CREATE TABLE IF NOT EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users_groups`; 

References

63217ed

Authentication system (functionality)

Description

Auth system...
The base logic and user interaction functionality, such as DOM manipulations, error handling, redirection after successful log-in and such goes here...

References

Static view page: #5

Setup Remote Server

  • Subdomain
  • LAMP
  • Framework
  • Database
  • Automated jobs(if possible on the blueH)

Use custom email server

Description

We might need to use an custom mail server for the forwarded mail owner address.

Services

  • Mandrill
  • SendGrid

Loading anim

Fix the lading anim to always align to center no matter the screen size.

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

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...

Sent Emails - Format | Structure

Sample 1

All type of incoming messages and after forwarded from the internal systems goes here:

Keyword(s): uploaded California City

HTML content: No

z_o_e_sample-1
Comments:
Nothing to be changed.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.