GithubHelp home page GithubHelp logo

creagia / laravel-web-mailer Goto Github PK

View Code? Open in Web Editor NEW
62.0 2.0 4.0 297 KB

Laravel mailer which will catch all the sent emails and show them on an application view.

License: MIT License

PHP 63.15% Blade 36.85%
laravel mailer

laravel-web-mailer's Introduction

Laravel Web Mailer

This package contains a web mailer which will catch all the sent emails. Then, you can view it visiting the route /web-inbox. The emails will be stored as a file in the storage folder.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Inbox screenshot

Support us

Laradir banner

Requirements

This package requires PHP 8.1 and Laravel 9. If you need compatibility with older versions, check the alternatives section.

Installation

You can install the package via composer:

composer require creagia/laravel-web-mailer

After that, open your config/mail.php file and add the web mailer entry in the mailers configuration array.

'mailers' => [
    // ...
    'web' => [
        'transport' => 'web',
    ],
],

Finally, you can enable the web mailer setting the defined mailer in your .env file:

MAIL_MAILER=web

We recommend you to publish the configuration file to be able to perform some customizations

php artisan vendor:publish --tag="web-mailer-config"

Inbox URL

The default URL to view the emails is /web-inbox. You can change it, adding the below entry to your .env file:

WEB_MAILER_ROUTE_PREFIX="your-custom-url"

Route protection

By default, the inbox URL is authorized for everybody who has the link. If you need to add some protection, you can modify the middleware array on the config/web-mailer.php file.

Delete all stored emails

php artisan laravel-web-mailer:clear-all

Delete stored emails older than N days

php artisan laravel-web-mailer:cleanup

You can run or schedule the command laravel-web-mailer:cleanup to delete the emails older than N days. By default, it will delete the emails older than 7 days. You can customize the number of days changing the delete_emails_older_than_days parameter on the config/web-mailer.php file.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Alternatives

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-web-mailer's People

Contributors

dependabot[bot] avatar dtorras avatar github-actions[bot] avatar laravel-shift avatar xmuntane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.