From f063d00a054df9cef97cdae7deb08856bab8a289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:12:13 +0300 Subject: [PATCH 1/2] added feature secret email (bcc) --- app/Abstracts/Notification.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Abstracts/Notification.php b/app/Abstracts/Notification.php index 196e2a917..a9ab9aabf 100644 --- a/app/Abstracts/Notification.php +++ b/app/Abstracts/Notification.php @@ -54,6 +54,10 @@ abstract class Notification extends BaseNotification implements ShouldQueue if (!empty($this->custom_mail['cc'])) { $message->cc($this->custom_mail['cc']); } + + if (!empty($this->custom_mail['bcc'])) { + $message->bcc($this->custom_mail['bcc']); + } return $message; } From 32ef8ce7ceb309e8afea60a706f15a20a7e4e2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:13:16 +0300 Subject: [PATCH 2/2] user emails were changed to bcc --- app/Jobs/Banking/SendTransactionAsCustomMail.php | 6 +++--- app/Jobs/Document/SendDocumentAsCustomMail.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Banking/SendTransactionAsCustomMail.php b/app/Jobs/Banking/SendTransactionAsCustomMail.php index db355b08e..2802035f4 100644 --- a/app/Jobs/Banking/SendTransactionAsCustomMail.php +++ b/app/Jobs/Banking/SendTransactionAsCustomMail.php @@ -28,7 +28,7 @@ class SendTransactionAsCustomMail extends Job $mail_request = $this->request->only(['to', 'subject', 'body']); if ($this->request->get('user_email', false)) { - $mail_request['cc'] = user()->email; + $mail_request['bcc'] = user()->email; } $attachments = collect($this->request->get('attachments', [])) @@ -52,8 +52,8 @@ class SendTransactionAsCustomMail extends Job 'body' => $mail_request['body'], ]; - if (($counter == 1) && ! empty($mail_request['cc'])) { - $custom_mail['cc'] = $mail_request['cc']; + if (($counter == 1) && ! empty($mail_request['bcc'])) { + $custom_mail['bcc'] = $mail_request['bcc']; } $contact->notify(new Notification($transaction, $this->template_alias, $attach_pdf, $custom_mail, $attachments)); diff --git a/app/Jobs/Document/SendDocumentAsCustomMail.php b/app/Jobs/Document/SendDocumentAsCustomMail.php index 263c7abfd..e6c7e7136 100644 --- a/app/Jobs/Document/SendDocumentAsCustomMail.php +++ b/app/Jobs/Document/SendDocumentAsCustomMail.php @@ -27,7 +27,7 @@ class SendDocumentAsCustomMail extends Job $mail_request = $this->request->only(['to', 'subject', 'body']); if ($this->request->get('user_email', false)) { - $mail_request['cc'] = user()->email; + $mail_request['bcc'] = user()->email; } $attachments = collect($this->request->get('attachments', [])) @@ -53,8 +53,8 @@ class SendDocumentAsCustomMail extends Job 'body' => $mail_request['body'], ]; - if (($counter == 1) && ! empty($mail_request['cc'])) { - $custom_mail['cc'] = $mail_request['cc']; + if (($counter == 1) && ! empty($mail_request['bcc'])) { + $custom_mail['bcc'] = $mail_request['bcc']; } $contact->notify(new $notification($document, $this->template_alias, $attach_pdf, $custom_mail, $attachments));