diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index d4b840c547d3..e0ef5317e617 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -91,7 +91,8 @@ class TemplateEmail extends Mailable if (strlen($settings->bcc_email) > 1) { if (Ninja::isHosted()) { $bccs = explode(',', str_replace(' ', '', $settings->bcc_email)); - $this->bcc(reset($bccs)); //remove whitespace if any has been inserted. + $this->bcc(array_slice($bccs, 0, 2)); + //$this->bcc(reset($bccs)); //remove whitespace if any has been inserted. } else { $this->bcc(explode(',', str_replace(' ', '', $settings->bcc_email))); }//remove whitespace if any has been inserted. @@ -116,11 +117,6 @@ class TemplateEmail extends Mailable 'whitelabel' => $this->client->user->account->isPaid() ? true : false, 'logo' => $this->company->present()->logo($settings), ]); - // ->withSymfonyMessage(function ($message) use ($company) { - // $message->getHeaders()->addTextHeader('Tag', $company->company_key); - // $message->invitation = $this->invitation; - //}); - // ->tag($company->company_key); /*In the hosted platform we need to slow things down a little for Storage to catch up.*/ diff --git a/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php b/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php new file mode 100644 index 000000000000..09658b6e71ed --- /dev/null +++ b/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php @@ -0,0 +1,41 @@ +index([\DB::raw('client_hash(20)')]); + }); + + + Schema::table('client_contacts', function (Blueprint $table) { + $table->index([\DB::raw('contact_key(20)')]); + $table->index('email'); + }); + + Schema::table('vendor_contacts', function (Blueprint $table) { + $table->index([\DB::raw('contact_key(20)')]); + $table->index('email'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +};