diff --git a/src/Email/SwiftMailer.php b/src/Email/SwiftMailer.php index 6dee0fa..cca9b3c 100644 --- a/src/Email/SwiftMailer.php +++ b/src/Email/SwiftMailer.php @@ -8,11 +8,13 @@ class SwiftMailer implements MailerInterface protected $transport; - protected $from; + protected /*stringable*/ $from; - protected $to; + protected /*stringable|array*/ $to; - protected $cc; + protected /*stringable|array*/ $cc; + + protected /*stringable|array*/ $bcc; public function __construct(EmailConfiguration $configuration) { $this->emailConfiguration = $configuration; @@ -28,6 +30,7 @@ class SwiftMailer implements MailerInterface ->setFrom( $this->from ) ->setTo( $this->to ) ->setCC($this->cc ?? []) + ->setBCC($this->bcc ?? []) ->setBody( $message, $html ? 'text/html' : 'text/plain' ); return ( new \Swift_Mailer($this->transport) )->send($swiftObj); @@ -54,4 +57,10 @@ class SwiftMailer implements MailerInterface return $this; } + public function setBCC(/*stringable|array*/ $bcc) : MailerInterface + { + $this->bcc = $bcc; + + return $this; + } } \ No newline at end of file