mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
27 lines
450 B
PHP
27 lines
450 B
PHP
<?php
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
use App\Constants\Domain;
|
|
use Utils;
|
|
|
|
/**
|
|
* Class SendsEmails.
|
|
*/
|
|
trait SendsEmails
|
|
{
|
|
public function getBccEmail()
|
|
{
|
|
return $this->isPro() ? $this->bcc_email : false;
|
|
}
|
|
|
|
public function getFromEmail()
|
|
{
|
|
if (! $this->isPro() || ! Utils::isNinja() || Utils::isReseller()) {
|
|
return false;
|
|
}
|
|
|
|
return Domain::getEmailFromId($this->domain_id);
|
|
}
|
|
}
|