dengrocrm/bad-mailer

This package is abandoned and no longer maintained. No replacement package was suggested.

A transport driver for Laravel's Mailer that always returns an error, intended for testing

1.0.0 2019-01-16 16:17 UTC

This package is auto-updated.

Last update: 2020-11-17 01:15:44 UTC


README

Bad Mailer is a transport driver for Laravel's Mailer that always returns an error, intended for testing.

Installation

Install using Composer for development:

composer require --dev dengrocrm/bad-mailer

Optionally for non development environments can remove the --dev flag. Next if version is less than 5.5 add to Laravel providers inside config/app.php:

Dengro\Badmailer\BadmailerServiceProvider::class,

Configuration

In the .env file set the mail driver to Bad Mailer:

MAIL_DRIVER=badmailer

Usage

WHen using Laravel Mailer, a 400 error will always be returned. An example of where this could be useful is in tests. The error message is:

[MOCK ERROR] 'to' parameter is not a valid address. please check documentation