Download the PHP package mail-map/laramail-map without Composer

On this page you can find all versions of the php package mail-map/laramail-map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laramail-map

laramail-map

Laravel interface for mail-map

Requirements

Installation

Usage

MailMap

See https://github.com/david-mk/mail-map for details on MailMap usage.

Setup

This provides an adapter for MailMap to be used within laravel. Simply publish the configuration with laravel's artisan vendor:publish command to make the configuration file config/mailmap.php. There you can provide credentials and configuration for MailMap to connect to your mail server.

The LaraMailMapServiceProvider injects basic MailMap and MailMap\MailFactory classes into the application container as singletons. You'll need to include this in the service provider section of your config/app.php if you only need the basics.

For more complex setups, you'll likely need to create your own service provider to handle different MailMap instances to your mailboxes/connections/mail-servers.

The LaraMailMap Extension: Mailboxes as Models

Depending on the size and scope of your application, it may be necessary to keep your emails objects separate from another, each with a different set of methods and properties that can manipulate your individual emails.

MailMap and in turn LaraMailMap are both designed to be as configurable as possible, allowing you access into each part of the library, so the specifics of this implementation is largely left to the developer.

However, the following is an example of how this can be approached by using the provided LaraMailMap extension of MailMap.

In this example, we're going to make a section of the application that is designed to handle emails that we get from github.(This requires that the emails are already in the desired mailbox. In gmail, this can be accomplished with filters and labels). Assume then that we already have our mail server setup with a mailbox called 'Github'.

First, we'll create an extension of the LaraMailMap class, which is itself an extension of MailMap.

You can put this wherever you like, but I'll put it in app/MailMaps.

Then we need create a class that will act as our "models" for our github emails. I put them in a sub-directory of a Models directory in order to distinguish them from other types of models.

As a side note, it is not required for the email "Models" to extend MailMap\Mail, although that class provides some helpful methods. They need only implement the MailMap\Contracts\Mail interface.

The last thing to do is to generate a service provider and wire everything together.

In config/mailmap.php, there is an option to list all of your mailboxes so that they can be easily accessed from the config() helper. In this case, the github emails are in the 'Github' mailbox, so an entry is added to config/mailmap.php

Of course, adding additional mailboxes to the list is completely optional. It is just a way to allow your code to remain ignorant of the actual name so that in case the mailbox name changes, you just need to change the configuration. (LaraMailMap will use the default inbox entry by default. See the service provider for more details.)

Now all we need to do is type hint the GithubMailMap class anywhere in our application, and we have instant access to all of our github emails. For example, in a controller


All versions of laramail-map with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.22
illuminate/support Version 5.3.*
mail-map/mail-map Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mail-map/laramail-map contains the following files

Loading the files please wait ....