Location: PHPKode > scripts > Encaps Gallery > encaps-2.3.22s/core/func_send_mail.php
<?php 
	function func_send_mail($_from_name,$_from_email,$_to,$_subject,$_message)
	{
		# Is the OS Windows or Mac or Linux 
		if (strtoupper(substr(PHP_OS,0,3)=='WIN')) { 
		  $eol="\r\n"; 
		} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) { 
		  $eol="\r"; 
		} else { 
		  $eol="\n"; 
		}
		
		# Common Headers 
		$headers = "From: $_from_name <$_from_email>".$eol; 
		# $headers .= 'Reply-To: $_from_name <$_from_email>'.$eol; 
		# $headers .= 'Return-Path: $_from_name <$_from_email>'.$eol; 
		$headers .= "X-Mailer: PHP v".phpversion().$eol;          // These two to help avoid spam-filters 
		
		# Boundry for marking the split & Multitype Headers 
		$headers .= 'MIME-Version: 1.0'.$eol; 
		$headers .= "Content-Type: text/html; charset=iso-8859-1".$eol; 
		$headers .= "Content-Transfer-Encoding: 8bit".$eol; 	
	
		# SEND THE EMAIL 
		ini_set("sendmail_from",$_from_email);  // the INI lines are to force the From Address to be used ! 
		$res = mail($_to, $_subject, $_message, $headers); 
		ini_restore("sendmail_from");
		return $res;
	}	
?>
Return current item: Encaps Gallery