mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for email quotas
This commit is contained in:
parent
36c3c624e9
commit
ef15933a0f
@ -88,9 +88,15 @@ class TemplateEmail extends Mailable
|
|||||||
|
|
||||||
$this->from(config('mail.from.address'), $email_from_name);
|
$this->from(config('mail.from.address'), $email_from_name);
|
||||||
|
|
||||||
if (strlen($settings->bcc_email) > 1)
|
if (strlen($settings->bcc_email) > 1){
|
||||||
|
|
||||||
|
if(Ninja::isHosted())
|
||||||
|
$this->bcc(reset(explode(",",str_replace(" ", "", $settings->bcc_email))));//remove whitespace if any has been inserted.
|
||||||
|
else
|
||||||
$this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
|
$this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->subject($this->build_email->getSubject())
|
$this->subject($this->build_email->getSubject())
|
||||||
->text('email.template.text', [
|
->text('email.template.text', [
|
||||||
'text_body' => $this->build_email->getTextBody(),
|
'text_body' => $this->build_email->getTextBody(),
|
||||||
|
@ -374,6 +374,9 @@ class Account extends BaseModel
|
|||||||
public function getDailyEmailLimit()
|
public function getDailyEmailLimit()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
||||||
|
return 50;
|
||||||
|
|
||||||
if($this->isPaid()){
|
if($this->isPaid()){
|
||||||
$limit = $this->paid_plan_email_quota;
|
$limit = $this->paid_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user