Pop\Mail\Mail::add PHP Method

add() public method

Add a recipient to the queue
public add ( string $email, string $name = null ) : Mail
$email string
$name string
return Mail
    public function add($email, $name = null)
    {
        $this->queue->add($email, $name);
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: MailTest.php プロジェクト: nicksagona/PopPHP
 public function testTo()
 {
     $m = new Mail('Subject');
     $m->to('*****@*****.**', 'Bob Smith');
     $m->add('*****@*****.**', 'Bubba Smith');
     $m->sendAsGroup(true);
     $this->assertEquals(2, count($m->getQueue()));
 }