sendAsGroup() 공개 메소드

Set the send as group flag
public sendAsGroup ( boolean $group ) : Mail
$group boolean
리턴 Mail
예제 #1
0
 public function testTo()
 {
     $m = new Mail('Subject');
     $m->to('*****@*****.**', 'Bob Smith');
     $m->add('*****@*****.**', 'Bubba Smith');
     $m->sendAsGroup(true);
     $this->assertEquals(2, count($m->getQueue()));
 }
예제 #2
0
파일: mail1.php 프로젝트: nicksagona/PopPHP
<?php

require_once '../../bootstrap.php';
use Pop\Mail\Mail;
try {
    $rcpts = array(array('name' => 'Test Smith', 'email' => '*****@*****.**'), array('name' => 'Someone Else', 'email' => '*****@*****.**'));
    $mail = new Mail('Hello World!', $rcpts);
    $mail->sendAsGroup(true)->from('*****@*****.**', 'Bob')->setHeaders(array('X-Mailer' => 'PHP/' . phpversion(), 'X-Priority' => '3'));
    $mail->setText("Hello,\n\nI'm just trying out this new Pop Mail component.\n\nThanks,\nBob\n\n");
    $mail->send();
    echo 'Mail Sent!';
} catch (\Exception $e) {
    echo $e->getMessage();
}