mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
ddc71b6971
@ -98,24 +98,12 @@ class NinjaMailerJob implements ShouldQueue
|
||||
$this->nmo->mailable->replyTo($this->company->owner()->email, $this->company->owner()->present()->name());
|
||||
}
|
||||
|
||||
$this->nmo->mailable->bcc('poop@gmail.com', 'hi');
|
||||
|
||||
$bcc_list = [];
|
||||
|
||||
if (strlen($this->nmo->settings->bcc_email) > 1) {
|
||||
|
||||
$bcc_list = explode(",", $this->nmo->settings->bcc_email);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//send email
|
||||
try {
|
||||
nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString());
|
||||
|
||||
Mail::mailer($this->mailer)
|
||||
->to($this->nmo->to_user->email)
|
||||
->bcc($bcc_list)
|
||||
->send($this->nmo->mailable);
|
||||
|
||||
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
||||
|
@ -80,6 +80,9 @@ class TemplateEmail extends Mailable
|
||||
|
||||
$this->from(config('mail.from.address'), $this->company->present()->name());
|
||||
|
||||
if (strlen($settings->bcc_email) > 1)
|
||||
$this->bcc(explode(",",$settings->bcc_email));
|
||||
|
||||
$this->subject($this->build_email->getSubject())
|
||||
->text('email.template.plain', [
|
||||
'body' => $this->build_email->getBody(),
|
||||
@ -105,9 +108,6 @@ class TemplateEmail extends Mailable
|
||||
$message->invitation = $this->invitation;
|
||||
});
|
||||
|
||||
//conditionally attach files
|
||||
// if ($settings->pdf_email_attachment !== false && ! empty($this->build_email->getAttachments())) {
|
||||
|
||||
//hosted | plan check here
|
||||
foreach ($this->build_email->getAttachments() as $file) {
|
||||
|
||||
@ -117,7 +117,6 @@ class TemplateEmail extends Mailable
|
||||
$this->attach($file['path'], ['as' => $file['name'], 'mime' => $file['mime']]);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user