0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.220.194.29


Current Path : /proc/thread-self/root/var/www/html/reva/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/reva/src/cManualMailer.php

<?php
 class CManualMailer
{
	public $mailer_info;
	public $subject;

	function __construct($mailer_info)
	{
		 
		$this->subject=$mailer_info[subject];
		$this->message=$mailer_info[body];
		for($i=0;$i<count($mailer_info['to']);$i++)
		{
		 $to_array[$i]=$mailer_info['to'][$i]['email'];
		}
		for($i=0;$i<count($mailer_info['cc']);$i++)
		{
		 $cc_array[$i]=$mailer_info['cc'][$i]['email'];
		}
		for($i=0;$i<count($mailer_info['bcc']);$i++)
		{
		 $bcc_array[$i]=$mailer_info['bcc'][$i]['email'];
		}
		 
		$this->to=implode(",",$to_array);
		$this->cc=implode(",",$cc_array);
		$this->bcc=implode(",",$bcc_array);
		 
		$this->from=$mailer_info['from']['name'];
		$this->replay_to=($mailer_info['from']['email']);
		
	 
		
	}
	function send_mail()
	{
		//define the receiver of the email
	// $to = 'natesha.s@tarkasoft.com';
	 //$this->cc='natesha.s@tarkasoft.com,ssnatesha@yahoo.com';
	 // $this->bcc='natesha.s@tarkasoft.com';
	//define the subject of the email
	 
	//define the message to be sent. Each line should be separated with \n
	//$message = "Hello World!\n\nThis is my first mail.";
	//define the headers we want passed. Note that they are separated with \r\n
	 $headers = "From: salary@ecandor.com\r\n";
	$headers .="Reply-To: {$this->replay_to}\r\n";
	if(!empty($this->cc))
	 $headers .="Cc: {$this->cc}\r\n";
	 if(!empty($this->bcc))
	$headers .="Bcc: {$this->bcc}\r\n";
	$headers .= "MIME-Version: 1.0\r\n";
	$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
 
	//send the email
	return @mail($this->to,$this->subject, ($this->message), $headers);
	//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
	//echo $mail_sent ? "Mail sent" : "Mail failed";
	}
	
	
}

function send_manual_mail($to,$subject,$message,$replay_to=null,$cc=null,$bcc=null)
	{
		 
	 $headers = "From: arvinmeritor@ecandor.com\r\n";
	//$headers = "From: natesha.s@tarkasoft.com\r\n";
	if(!empty($replay_to) && !is_null($replay_to))
	$headers .="Reply-To: {$replay_to}\r\n";
	if(!empty($cc) && !is_null($cc))
	 $headers .="Cc: {$cc}\r\n";
	/*	if(!empty($bcc) && !is_null($bcc))
	 $headers .="Bcc: {$bcc}\r\n"; */
	  $headers .="Bcc: natesha.s@tarkasoft.com\r\n"; 
	 //$headers .= "MIME-Version: 1.0\r\n";
	 //$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
 
	//send the email
 
	$message=strip_tags($message);
	$message=str_ireplace("\t","",$message);;
	return @mail($to,$subject, $message, $headers);
	
	//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
	//echo $mail_sent ? "Mail sent" : "Mail failed";
	}

?>