Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
/ bad-mailer Public archive

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

Notifications You must be signed in to change notification settings

dengrocrm/bad-mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bad Mailer

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages