From 93b9035531d8d534764af723973c2d682691f49e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 18 Jun 2019 18:23:48 -0600 Subject: [PATCH] Add ContactPipeline --- app/Jobs/ContactPipeline/ContactPipeline.php | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/Jobs/ContactPipeline/ContactPipeline.php diff --git a/app/Jobs/ContactPipeline/ContactPipeline.php b/app/Jobs/ContactPipeline/ContactPipeline.php new file mode 100644 index 00000000..a3c9654e --- /dev/null +++ b/app/Jobs/ContactPipeline/ContactPipeline.php @@ -0,0 +1,44 @@ +contact = $contact; + } + + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $contact = $this->contact; + if(config('instance.contact.enabled') == false || $this->read_at !== null) { + return; + } + $email = config('instance.email'); + Mail::to($email)->send(new ContactAdmin($contact)); + } +}