Added email config for dev/testing
Change-Id: If7e26d0d12b7cd90ccdc4b4f113b0de80f6d5e23
This commit is contained in:
parent
3c757f9cd2
commit
d54f301ab1
@ -40,6 +40,7 @@ use App\Factories\EntityEvents\TrackActionEntityEventFactory;
|
||||
use App\Factories\EntityEvents\TrackGroupActionActionEntityEventFactory;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\App;
|
||||
/**
|
||||
* Class EventServiceProvider
|
||||
* @package App\Providers
|
||||
@ -70,6 +71,12 @@ final class EventServiceProvider extends ServiceProvider
|
||||
EntityEventPersister::persist(MyScheduleAddEntityEventFactory::build($event));
|
||||
});
|
||||
|
||||
Event::listen(\Illuminate\Mail\Events\MessageSending::class, function($event){
|
||||
if(App::environment() === 'dev' || App::environment() === 'testing' ){
|
||||
$event->message->setTo(env('DEV_EMAIL_TO'));
|
||||
}
|
||||
});
|
||||
|
||||
Event::listen(\App\Events\MyFavoritesAdd::class, function($event)
|
||||
{
|
||||
EntityEventPersister::persist(MyFavoritesAddEntityEventFactory::build($event));
|
||||
|
Loading…
x
Reference in New Issue
Block a user