mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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->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
|
//send email
|
||||||
try {
|
try {
|
||||||
nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString());
|
nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString());
|
||||||
|
|
||||||
Mail::mailer($this->mailer)
|
Mail::mailer($this->mailer)
|
||||||
->to($this->nmo->to_user->email)
|
->to($this->nmo->to_user->email)
|
||||||
->bcc($bcc_list)
|
|
||||||
->send($this->nmo->mailable);
|
->send($this->nmo->mailable);
|
||||||
|
|
||||||
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
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());
|
$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())
|
$this->subject($this->build_email->getSubject())
|
||||||
->text('email.template.plain', [
|
->text('email.template.plain', [
|
||||||
'body' => $this->build_email->getBody(),
|
'body' => $this->build_email->getBody(),
|
||||||
@ -105,9 +108,6 @@ class TemplateEmail extends Mailable
|
|||||||
$message->invitation = $this->invitation;
|
$message->invitation = $this->invitation;
|
||||||
});
|
});
|
||||||
|
|
||||||
//conditionally attach files
|
|
||||||
// if ($settings->pdf_email_attachment !== false && ! empty($this->build_email->getAttachments())) {
|
|
||||||
|
|
||||||
//hosted | plan check here
|
//hosted | plan check here
|
||||||
foreach ($this->build_email->getAttachments() as $file) {
|
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']]);
|
$this->attach($file['path'], ['as' => $file['name'], 'mime' => $file['mime']]);
|
||||||
|
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user