Pop\Mail\Mail::bcc PHP 메소드

bcc() 공개 메소드

Alias to set the bcc headers
public bcc ( string $email, string $name = null ) : Mail
$email string
$name string
리턴 Mail
    public function bcc($email, $name = null)
    {
        if (is_array($email)) {
            $bccQueue = new Queue($email);
            $header = (string) $bccQueue;
        } else {
            $header = null !== $name ? $name . ' <' . $email . '>' : $email;
        }
        $this->setHeader('Bcc', $header);
        return $this;
    }

Usage Example

예제 #1
0
 public function testBcc()
 {
     $m = new Mail('Subject');
     $m->bcc('*****@*****.**', 'Bob Smith');
     $this->assertEquals('Bob Smith <*****@*****.**>', $m->getHeader('Bcc'));
     $m->bcc(array('*****@*****.**', '*****@*****.**'));
     $this->assertEquals('[email protected], [email protected]', $m->getHeader('Bcc'));
 }