Merge pull request #3067 from CihanSenturk/Add-confidential-email-(bcc)-sending-feature
Add confidential email (bcc) sending feature
This commit is contained in:
commit
e83476c9fa
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue