Download the PHP package filippo-toso/laravel-mailog without Composer

On this page you can find all versions of the php package filippo-toso/laravel-mailog. 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 laravel-mailog

Laravel Mailog

This package allows you to store all your application outgoing email into a database and (optionally) view them using the integrated Web UI.

You can use it as a mail transport (no email is delivered) or as an event listener (all emails are delivered normally but also logged into the database).

Why does this exist?

Maybe you are asking yourself why I built this package when there's the log driver or services like Mailtrap, etc.

I work with a lot of institutional customers (banks, public bodies, you name it...). These customers are very picky about where their data is stored (ie. Are Mailtrap data centers in the EU? How are they secured? Who has access to them? And the list goes on, and on, and on...). This package offers a self-hosted solution that works perfectly in both test and production environments and meets their stringent requirements.

Installation

Install the package using composer:

If you want/need to customize the configuration (ie. use a different database for the logging, etc.), publish the configuration file and change it accordingly:

Publish the migrations and change them accordingly:

Then, execute the migrations:

Use it as a Mail Transport

In your config/mail.php file add the mailog mailer as shown below.

Then edit your .env file as follows:

Use it as an Event Listener

Just edit the config/mailog.php file as follows:

Access the Web UI

If you want to use the built-in web UI, you can register the routes in your web.php file. Then you'll be able to access the UI using the /mailog/messages url.

If you want to customize the UI, you can publish the views as follows:

You can also override the FilippoToso\LaravelMailog\Http\Controllers\MessageController class and change its behaviour. For instance you could add a filter for your tenant:

Then you have to update your routes file to point to the right controller. You can take inspiration from the FilippoToso\LaravelMailog\Support\Routes::register() method.

Overriding the Mail Transport behaviour

In the config/mailog.php file you can specify a class to use as a transport. For instance, you can override the provided MailogTransport class and add the support for tenancy as follows:

Please beware, the use of tenant('id') for identifing the tenant foreign key is just an example taken from the stancl/tenancy package. Depending on how you are implementing the tenancy, you should adapt the code as needed.

Other useful things to know

The package includes a mailog:purge-messages command. You can schedule it in the scheduler and configure its behaviour in the purge section of the config/mailog.php file


All versions of laravel-mailog with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version >=9.0
illuminate/config Version >=9.0
illuminate/mail Version >=9.0
illuminate/database Version >=9.0
illuminate/http Version >=9.0
illuminate/console Version >=9.0
illuminate/view Version >=9.0
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 filippo-toso/laravel-mailog contains the following files

Loading the files please wait ...