Location: PHPKode > projects > MembersGear > membersgear/includes/phpmailer/test.php
<?php

    require_once("../../config/config.php");
    require_once("Functions.php");
    //include "../../config/config.php";
    sendMail('hide@address.com','nikunj gandhi','test subject','test <b>body</b>','',false);
    
    
    
    function SunDaysIncluded($pStartDate, $pEndDate)
    {
         $liCurrentDate = $pStartDate;
         
         $liResult = 0;
         
         while($liCurrentDate  <= $pEndDate)
         {
            
             if(strtoupper(date("l",$liCurrentDate))=='SUNDAY')
             {
                $liResult += 1;

             } 
             $liCurrentDate +=86400;  
         }
            
         return $liResult;
    
    }
    
    function SaturdaysIncluded($pStartDate, $pEndDate)
    {
         $liCurrentDate = $pStartDate;
         
         $liResult = 0;
         
         while($liCurrentDate  <= $pEndDate)
         {
            
             if(strtoupper(date("l",$liCurrentDate))=='SATURDAY')
             {
                $liResult += 1;

             } 
             $liCurrentDate +=86400;  
         }
            
         return $liResult;
    
    }

//echo SunDaysIncluded(time(),time()+950400)."<br />";
//echo SaturdaysIncluded(time(),time()+864000);
//echo strtoupper(date("l",time()+432000))

function DoMail($From, $To,  $Subject, $Body, $IsHTML=true, $CC='', $BCC='', $ReplyTo='')
{

    $Headers =  '';

    if($IsHTML==true)
    { 
        $Headers  = 'MIME-Version: 1.0' . "\r\n";
        $Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    }
    
    if($From!='') 
        $Headers .= 'From: '.$From . "\r\n";
         
    if($CC!='') 
        $Headers .= 'Cc: '.$CC . "\r\n";
        
    if($BCC!='') 
        $Headers .= 'Bcc: '.$BCC . "\r\n";

    if($ReplyTo!='') 
        $Headers .= 'Reply-To: '.$ReplyTo . "\r\n";

        
    if(mail($To, $Subject, $Body, $Headers))
        return true;
    else
        return false;    

}


//DoMail('hide@address.com','hide@address.com','this is subject','this is <b>body</b>',false,'hide@address.com','hide@address.com','hide@address.com');

?>
Return current item: MembersGear