1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/app/Models/Traits/SendsEmails.php
2017-01-12 22:25:01 +02:00

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);
}
}