setHeaders() public method

Set mail headers
public setHeaders ( array $headers ) : Mail
$headers array
return Mail
Beispiel #1
0
 public function testSetAndGetHeaders()
 {
     $m = new Mail();
     $m->setHeader('X-Reply-To', '*****@*****.**');
     $m->setHeader('X-Reply-To', 'Bob <*****@*****.**>');
     $m->replyTo('*****@*****.**');
     $m->setHeaders(array('Reply' => '*****@*****.**'));
     $m->setParams(' -i');
     $m->setParams(array(' -t'));
     $m->setParams();
     $this->assertEquals('*****@*****.**', $m->getHeader('Reply-To'));
     $this->assertEquals(4, count($m->getHeaders()));
 }