From 1f537faf32d5f56780653958d3c09a0d6f19644f Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 3 Jan 2017 19:50:15 +0000 Subject: [PATCH] Default the mail from address. Closes #2297 --- app/Foundation/Providers/ConfigServiceProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Foundation/Providers/ConfigServiceProvider.php b/app/Foundation/Providers/ConfigServiceProvider.php index b1d232645..bf2a790cb 100644 --- a/app/Foundation/Providers/ConfigServiceProvider.php +++ b/app/Foundation/Providers/ConfigServiceProvider.php @@ -88,6 +88,12 @@ class ConfigServiceProvider extends ServiceProvider } $this->app->config->set('cors.paths.api/v1/*.allowedOrigins', $allowedOrigins); + + // Set the mail from address. + if (!$this->app->config->get('mail.from.address')) { + $url = parse_url($appDomain)['host']; + $this->app->config->set('mail.from.address', "notify@{$url}"); + } } /**