diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index c12d829ae157..86ae1adbf505 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -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', [ diff --git a/app/Models/Account.php b/app/Models/Account.php index 2aef2603d7c1..0ad6674c9f1d 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -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;