nt($prelay)) $this->_porelay = $prelay;
elseif(PRINT_ERROR) trigger_error("Invalid TSL/SSL port number value on class XPertMailer->auth()", 512);
}elseif(PRINT_ERROR) trigger_error("Your
PHP don't have SSL support on class XPertMailer->auth()", 512);
}
}elseif(PRINT_ERROR) trigger_error("Invalid SSL value on class XPertMailer->auth()", 512);
}elseif(PRINT_ERROR) trigger_error("Invalid parameter(s) on class XPertMailer->auth()", 512);
}
function headers($arrh){
if(is_array($arrh) && count($arrh) > 0){
$rebh = array();
foreach($arrh as $numh => $valh){
if(is_string($numh) && is_string($valh) && !empty($numh) && !empty($valh)){
if(isset($rebh[$numh]) && PRINT_ERROR) trigger_error("Duplicate array key on class XPertMailer->headers()", 1024);
$rebh[$numh] = $valh;
}elseif(PRINT_ERROR) trigger_error("Invalid array parameter type on class XPertMailer->headers()", 1024);
}
$this->_setarrh = $rebh;
}elseif(PRINT_ERROR) trigger_error("Invalid parameter type on class XPertMailer->headers()", 512);
}
function _attach_file($attc, $typeatt){
$reb1st = $reb2nd = array();
$lst1st = $this->_attc1st;
$lst2nd = $this->_attc2nd;
foreach($attc as $numa => $vala){
if(is_string($vala) && !empty($vala)){
if(is_file($vala)){
if(is_readable($vala)){
$nmfile = (is_string($numa) && !empty($numa)) ? $numa : basename($vala);
if(isset($reb1st[$nmfile]) || isset($reb2nd[$nmfile]) || isset($lst1st[$nmfile]) || isset($lst2nd[$nmfile])){
if(PRINT_ERROR) trigger_error("Duplicate file name on class XPertMailer->_attach_file()", 1024);
}
if(strstr($nmfile, '/')){
if(PRINT_ERROR) trigger_error("Do not include path value in the name of the file ".$nmfile." on class XPertMailer->_attach_file()", 1024);
$nmfile = basename($nmfile);
}
if($typeatt == 1) $reb1st[$nmfile] = $vala;
elseif($typeatt == 2) $reb2nd[$nmfile] = $vala;
}elseif(PRINT_ERROR) trigger_error("Can't read file: ".$vala." on class XPertMailer->_attach_file()", 1024);
}elseif(PRINT_ERROR) trigger_error("File: ".$vala." doesn't exists on class XPertMailer->_attach_file()", 1024);
}elseif(PRINT_ERROR) trigger_error("Invalid array parameter type on class XPertMailer->_attach_file()", 1024);
}
$this->_attc1st = array_merge($lst1st, $reb1st);
$this->_attc2nd = array_merge($lst2nd, $reb2nd);
}
function attach($arratt, $attype = 2){
if(is_array($arratt) && count($arratt) > 0){
if(is_int($attype) && ($attype == 1 || $attype == 2)) $this->_attach_file($arratt, $attype);
elseif(PRINT_ERROR) trigger_error("Invalid 2'nd parameter value on class XPertMailer->attach()", 512);
}elseif(PRINT_ERROR) trigger_error("Invalid first parameter value on class XPertMailer->attach()", 512);
}
function clear_attach($clearatt = 3){
if(is_int($clearatt) && ($clearatt == 1 || $clearatt == 2 || $clearatt == 3)){
if($clearatt == 1) $this->_attc1st = array();
elseif($clearatt == 2) $thi