mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
25 lines
453 B
PHP
25 lines
453 B
PHP
<?php namespace App\Models\Traits;
|
|
|
|
use Utils;
|
|
use App\Constants\Domain;
|
|
|
|
/**
|
|
* Class SendsEmails
|
|
*/
|
|
trait SendsEmails
|
|
{
|
|
public function getBccEmail()
|
|
{
|
|
return $this->isPro() ? $this->bcc_email : false;
|
|
}
|
|
|
|
public function getFromEmail()
|
|
{
|
|
if ( ! $this->isPro() || ! Utils::isNinjaProd() || Utils::isReseller()) {
|
|
return false;
|
|
}
|
|
|
|
return Domain::getEmailFromId($this->domain_id);
|
|
}
|
|
}
|