Skip to content

Commit

Permalink
mail: configure cc and bcc
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Oct 25, 2016
1 parent a6f33fa commit 516f0fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/core/Directus/Mail/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Clousure;
use Directus\Bootstrap;
use Directus\Util\ArrayUtils;
use InvalidArgumentException;
use Swift_Message;

Expand Down Expand Up @@ -58,6 +59,16 @@ public static function send($viewPath, $data, $callback)
$mailConfig = $config['mail'];
$message->setFrom($mailConfig['from']);

$bcc = ArrayUtils::get($mailConfig, 'bcc', null);
if ($bcc !== null) {
$message->setBcc($bcc);
}

$cc = ArrayUtils::get($mailConfig, 'cc', null);
if ($cc !== null) {
$message->setCc($cc);
}

call_user_func($callback, $message);

if ($message->getBody() == null) {
Expand Down

0 comments on commit 516f0fe

Please sign in to comment.