mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for email quotas
This commit is contained in:
parent
36c3c624e9
commit
ef15933a0f
@ -88,8 +88,14 @@ class TemplateEmail extends Mailable
|
||||
|
||||
$this->from(config('mail.from.address'), $email_from_name);
|
||||
|
||||
if (strlen($settings->bcc_email) > 1)
|
||||
$this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
|
||||
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->subject($this->build_email->getSubject())
|
||||
->text('email.template.text', [
|
||||
|
@ -374,6 +374,9 @@ class Account extends BaseModel
|
||||
public function getDailyEmailLimit()
|
||||
{
|
||||
|
||||
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
||||
return 50;
|
||||
|
||||
if($this->isPaid()){
|
||||
$limit = $this->paid_plan_email_quota;
|
||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
||||
|
Loading…
Reference in New Issue
Block a user