Trigger email failures to assert what happens on your Laravel Application when an email fails to send

Overview

Laravel Email Failer

Build Status Build status StyleCI Quality Gate Status Coverage Maintainability Rating Latest Stable Version Total Downloads License MadeWithLaravel.com shield

Laravel Email Failer

composer require --dev rogervila/laravel-email-failer

About

Trigger email failures to assert what happens on your Laravel Application when an email fails to send

Usage

Once the mailer instance is replaced, all emails will fail. This helps to assert that your application Mail exceptions are handled correctly (ie: mark the email address as invalid)

public function test_happy_path()
{
    Mail::fake();

    MyService::sendEmail();

    Mail::assertSent(MyMailable::class);
}

public function test_email_failures()
{
    $mailer = new \LaravelEmailFailer\MailFailer;
    $this->app->instance('mailer', $mailer);
    
    MyService::sendEmail();

    Mail::assertNotSent(MyMailable::class);
    
    dump(Mail::failures());
    // Assert here what happens when the email has failed
}

License

Laravel Email Failer is open-sourced software licensed under the MIT license.

Icon made by Darius Dan from www.flaticon.com is licensed by CC 3.0 BY

Comments
  • Update phpunit/phpunit requirement from ^7.5 || ^8.0 to ^7.5 || ^8.0 || ^9.0

    Update phpunit/phpunit requirement from ^7.5 || ^8.0 to ^7.5 || ^8.0 || ^9.0

    Updates the requirements on phpunit/phpunit to permit the latest version.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    9.0.0 - 2020-02-07

    Added

    • Implemented #3797: Add support for multiple --whitelist options

    Changed

    • Implemented #3746: Improve developer experience of global wrapper functions for assertions
    • Implemented #3914: Refactor PHPUnit\Util\Configuration
    • Implemented #4024: Make PHPUnit\TextUI\ResultPrinter an interface
    • Multiple test case classes (classes that extend TestCase) that are declared in a single sourcecode file are no longer supported

    Removed

    • Implemented #3333: Remove annotation(s) for expecting exceptions
    • Implemented #3334: Drop support for PHP 7.2
    • Implemented #3339: Remove assertions (and helper methods) that operate on (non-public) attributes
    • Implemented #3342: Remove optional parameters of assertEquals() and assertNotEquals()
    • Implemented #3370: Remove assertInternalType() and assertNotInternalType()
    • Implemented #3426: Clean up assertContains() and assertNotContains()
    • Implemented #3495: Remove assertArraySubset()
    • Implemented #3523: Remove the setUseErrorHandler() method
    • Implemented #3630: Deprecate support for ClassName<*> as values for @covers and @uses annotations (this deprecation is not implemented in code, you will not get a deprecation warning when you use this feature in PHPUnit 9)
    • Implemented #3770: Deprecate MockBuilder::setMethods() (this deprecation is not implemented in code, you will not get a deprecation warning when you use this feature in PHPUnit 9)
    • Implemented #3776: Deprecate expectException(PHPUnit\Framework\Error\*)
    • Implemented #3951: Remove optional parameters of assertFileEquals() etc.
    • Implemented #3956: Remove support for doubling multiple interfaces
    • Implemented #3957: Remove expectExceptionMessageRegExp()
    • Implemented #4012: Remove class name as CLI argument
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Update laravel/framework requirement from 5.8.x to 6.0.0

    Update laravel/framework requirement from 5.8.x to 6.0.0

    Updates the requirements on laravel/framework to permit the latest version.

    Release notes

    Sourced from laravel/framework's releases.

    v6.0.0

    Check the upgrade guide in the Official Laravel Documentation.

    Changelog

    Sourced from laravel/framework's changelog.

    v6.0.0 (2019-09-03)

    Check the upgrade guide in the Official Laravel Documentation.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 0
  • Update orchestra/testbench requirement from ^3 to ^3 || ^4

    Update orchestra/testbench requirement from ^3 to ^3 || ^4

    Updates the requirements on orchestra/testbench to permit the latest version.

    Release notes

    Sourced from orchestra/testbench's releases.

    v4.0.0

    Changes

    • Update support for Laravel Framework v6.0.
    • Increase minimum PHP version to 7.2+ (tested with 7.2 and 7.3).
    • Increase minimum PHPUnit to v8.0+.
    • Configuration changes:
      • BCRYPT_ROUNDS now defaults to 10.
      • REDIS_CLIENT now defaults to phpredis.
      • REDIS_CLUSTER now defaults to redis.

    Breaking Changes

    • Any tests requiring Redis would now requires ext-redis to be installed. As of now you either can setup Redis or set REDIS_CLIENT and REDIS_CLUSTER to the deprecated predis option.
    Changelog

    Sourced from orchestra/testbench's changelog.

    4.0.0

    Released: 2019-09-03

    Changes

    • Update support for Laravel Framework v6.0.
    • Increase minimum PHP version to 7.2+ (tested with 7.2 and 7.3).
    • Increase minimum PHPUnit to v8.0+.
    • Configuration changes:
      • BCRYPT_ROUNDS now defaults to 10.
      • REDIS_CLIENT now defaults to phpredis.
      • REDIS_CLUSTER now defaults to redis.

    Breaking Changes

    • Any tests requiring Redis would now requires ext-redis to be installed. As of now you either can setup Redis or set REDIS_CLIENT and REDIS_CLUSTER to the deprecated predis option.
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 0
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Could not parse version constraint >= 5.8.x: Invalid version string "5.8.x"
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    You can mention @dependabot in the comments below to contact the Dependabot team.

    opened by dependabot-preview[bot] 0
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Could not parse version constraint >= 5.8.x: Invalid version string "5.8.x"
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    You can mention @dependabot in the comments below to contact the Dependabot team.

    opened by dependabot-preview[bot] 0
  • Update phpunit/phpunit requirement from ^7.5 to ^7.5 || ^8.0

    Update phpunit/phpunit requirement from ^7.5 to ^7.5 || ^8.0

    Updates the requirements on phpunit/phpunit to permit the latest version.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    8.2.5 - 2019-07-15

    Fixed

    • Fixed #3747: Regression in StringStartsWith constraint
    • Fixed #3752: expectException() fails with getMockForAbstractClass()

    [8.2.4] - 2019-07-03

    Changed

    • Implemented #3744: More context when value with incompatible type is configured to be returned by stub

    [8.2.3] - 2019-06-19

    Fixed

    • Fixed #3722: getObjectForTrait() does not work for traits that declare a constructor
    • Fixed #3723: Unescaped dash in character group in regular expression

    [8.2.2] - 2019-06-15

    Changed

    • Scoped PHAR built with newer version of PHP-Scoper

    [8.2.1] - 2019-06-07

    Fixed

    • Fixed type#2: Stubbing of methods with callable or iterable return type does not work

    [8.2.0] - 2019-06-07

    Added

    • Implemented #3506: PHP options should be passed to child processes
    • Implemented #3586: Show time spent on code coverage report generation
    • Implemented #3682: Allow using duration for the --order-by option as well as for the executionOrder attribute in phpunit.xml

    Changed

    • Implemented #3122: Prevent runtime type error due to wrong return value configuration of test double
    • Implemented #3708: Built-in assertion and mock type definitions

    Fixed

    • Fixed #3602: PHPUnit silently ignores the return value on a void method of test double
    ... (truncated)
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it). To ignore the version in this PR you can just close it
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 0
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • composer.json (composer)

    Configuration

    🔡 Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 2 Pull Requests:

    Pin dependencies
    Update dependency orchestra/testbench to v7
    • Schedule: ["at any time"]
    • Branch name: renovate/orchestra-testbench-7.x
    • Merge into: master
    • Upgrade orchestra/testbench to 7.6.0

    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Releases(0.4.0)
How to get cookies from users' browser and send the information to your email address and telegram bot

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

MAXWELL 3 Dec 3, 2022
This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Protone Media 300 Dec 30, 2022
myV - Send valentine to Your love!

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

null 2 Feb 14, 2022
Laravel Authentication Log is a package Log user authentication details and send new device notifications.

Laravel Authentication Log is a package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, etc. as well as sends out notifications via mail, slack, or sms for new devices and failed logins.

Anthony Rappa 540 Jan 5, 2023
Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Novath Thomas 1 Dec 1, 2021
Send PHP errors to Flare

Send PHP errors to Flare This repository contains a PHP client to send PHP errors to Flare. Documentation You can find the documentation of this packa

Spatie 64 Dec 26, 2022
Send ping to search engine by Index now protocol.

Index now PHP protocol Easy to use protocol that websites can call to notify search engines whenever website contents on any URL is updated or created

Baraja packages 3 Sep 10, 2022
A bring-your-own-email-first newsletter service. ✨

Typewrite Typewrite a hosted bring-your-own-email newsletter service for people who need a simplistic and privacy-first newsletter service. The core a

Ryan Chandler 3 Dec 2, 2021
Automatically load your helpers in your laravel application.

Laravel AutoHelpers Automatically load your helpers in your laravel application. Installation You can install the package via composer: composer requi

Florian Wartner 6 Jul 26, 2021
Simple transactional email classes/templates for Laravel 5 mailables

Tuxedo Tuxedo is an easy way to send transactional emails with Laravel's Mail classes, with the templates already done for you. Contents Installation

Tom Irons 92 May 27, 2022
Laravel Disposable Email Validator

Laravel Disposable Email Validator Prevent users from registrering with a disposable email addresses! Table of Contents Installation Usage Translation

Tim Wassenburg 2 Oct 12, 2022
Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

GlaivePro 64 Jul 17, 2022
🥳🔐 This package is a Laravel package that checks if an email address is a spammer

This package is a Laravel package that checks if an email address is a spammer. It verifies your signups and form submissions to confirm that they are legitimate.

Endurance, the Martian 15 Dec 19, 2022
Laravel Email Audit Log

This service provider will monitor all emails that has been sent out of your system. Sent emails will be stored in email_audit_log table

Aleksandar Djokic 9 Sep 27, 2022
LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

Tyler Arbon 437 Nov 17, 2022
User authentication REST API with Laravel (Register, Email verification, Login, Logout, Logged user data, Change password, Reset password)

User Authentication API with Laravel This project is a user authentication REST API application that I developed by using Laravel and MySql. Setup Fir

Yusuf Ziya YILDIRIM 3 Aug 23, 2022
A package to validate email domains in a user registration form

This package allows to define a subset of allowed email domains and validate any user registration form with a custom rule.

H-FARM 56 Jul 19, 2022
Email validation service in PHP

Email validation service Email validation service in PHP using Laravel 8. Validation features Domain Regular Expression Smtp Txt records Installing de

Pedro 1 Oct 30, 2021
A package to validate email domains in a user registration form

Laravel Email Domain Rule This package allows to define a subset of allowed email domains and validate any user registration form with a custom rule.

H-FARM Innovation 56 Jul 19, 2022