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

27 lines
450 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Models\Traits;
use App\Constants\Domain;
2017-01-30 20:40:43 +01:00
use Utils;
/**
2017-01-30 20:40:43 +01:00
* Class SendsEmails.
*/
trait SendsEmails
{
public function getBccEmail()
{
return $this->isPro() ? $this->bcc_email : false;
}
public function getFromEmail()
{
2017-01-30 17:05:31 +01:00
if (! $this->isPro() || ! Utils::isNinja() || Utils::isReseller()) {
return false;
}
return Domain::getEmailFromId($this->domain_id);
}
}