private function validarHeaders($headers,$destination)
	{
		foreach ($headers as $key => $header)
		{
			if(!in_array($key, $this->headers))
			{
				unset($headers[$key]);
			}
			else
			{
				$headers[$key] = "$key:$header";
			}
		}
		if(count($headers)>0)
		{
			$headers['To'] = $destination;
			array_unshift($headers, "MIME-Version: 1.0","X-Priority: 1");
			array_push($headers, "X-Mailer: PHP/".phpversion());
		}
		return implode("\r\n", $headers);
	}
private function validarHeaders($headers,$destination)
	{
		foreach ($headers as $key => $header)
		{
			if(!in_array($key, $this->headers))
			{
				unset($headers[$key]);
			}
			else
			{
				$headers[$key] = "$key:$header";
			}
		}
		if(count($headers)>0)
		{
			$headers['To'] = $destination;
			array_unshift($headers, "MIME-Version: 1.0","X-Priority: 1");
			array_push($headers, "X-Mailer: PHP/".phpversion());
		}
		return implode("\r\n", $headers);
	}
private function validarHeaders ( $ headers , $ destination ) { foreach ( $ headers as $ key => $ header ) { if ( ! in_array ( $ key , $ this -> headers ) ) { unset ( $ headers [ $ key ] ) ; } else { $ headers [ $ key ] = "$key:$header" ; } } if ( count ( $ headers ) > 0 ) { $ headers [ 'To' ] = $ destination ; array_unshift ( $ headers , "MIME-Version: 1.0" , "X-Priority: 1" ) ; array_push ( $ headers , "X-Mailer: PHP/" . phpversion ( ) ) ; } return implode ( "\r\n" , $ headers ) ; }
Permite validar los headers que el usuario desea incorporar al correo electronico que se enviara
@param  array  $headers     Arreglo asociativo con los headers
@param  string $destination Caena de texto separada por comas de los destinatarios
@return string              Cadena de texto de headersGuia
Permite validar los headers que el usuario desea incorporar al correo electronico que se enviara