AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TMCPRO/pages/testmail.php
<?php
include 'includes/config_tmcpro2.php' ; 
include 'includes/stable_functions_tmcpro.php' ;
function envoyer_email($type, $id) {

include 'code/facture-pdf-mail.php' ;

$facture = new Facture ($id) ;
// 
$s = $facture->Output() ;
// $pdf->Output($chemFact.$fact_id.".pdf", 'S') ;
// $s = $facture->Output('','F');
	global $agence;
	// $path = 'https://tmcpro.logmcpro.fr/pages/code/fact.php?fid=23931';
	// $type = pathinfo($path, PATHINFO_EXTENSION);
	// $s = file_get_contents($path);
	// $s = 'data: '.mime_content_type($type).';base64,'.$s;	
	// $path = 'https://tmcpro.logmcpro.fr/pages/code/fact.php?fid=23931';
	// $type = 'pdf';
	// $data = file_get_contents($path);
	// $s = 'data:application/pdf/' . $type . ';base64,' . base64_encode($data);
	// echo " ********* ".$type;
	// echo $data;
	// print_r($data );
	// exit();
		define('EMAIL_EXPEDITEUR', 'MC PRO');
		define('EMAIL_EXPEDITEUR_ADRESSE','comptabilite@mc-pro.fr');

	
	$boundary = md5(uniqid(rand())) ;
	$headers = "Content-Type: multipart/mixed; boundary=\"$boundary\"\n" ;
	$headers .= "Content-Transfer-Encoding: base64\n" ;
	$headers .= "From: \"".EMAIL_EXPEDITEUR."\" <".EMAIL_EXPEDITEUR_ADRESSE.">\n" ;
	$headers .= "MIME-Version: 1.0\n" ;

	$txt='';
	$html='';
	

$facturation = dbi_fetch_row(dbi_query("SELECT client_nom, f.num_fact,f.fact_id, date_fact FROM facture f LEFT JOIN client c USING (client_id) WHERE f.fact_id='$id'"));
// echo "<pre>";
// print_r($facturation);
// echo "<pre>";
$client_mail_Fact = 'sofian.elmghari59@gmail.com' ;  
$date=$facturation['date_fact'];
$date_fact=$facturation['date_fact'];
$date=substr($date, 0,4).'/'.substr($date, 4,2).'/'.substr($date, 6,2);

$attachment = chunk_split(base64_encode($s));
$msg .= "--$boundary\r\n";
$msg.= "Content-type: text/html; charset=\"iso-8859-1\"\n\n";
$msg.= "Cher Client,<br/>Veuillez trouver en pièce jointe votre facture du $date<br/>Vous en souhaitant bonne réception.<br/>Cordialement,<br/>L'équipe MC PRO<br/>PS :  Pour vos règlements par chèque, nous vous remercions de les envoyer à l'adresse suivante : MC PRO - 525 Avenue Laennec - 83140 Six-Fours-Les-Plages   <br/><br/><br/>";
$msg .= "--$boundary\r\n";

$msg .= "--$boundary\r\n";

$msg .= "Content-Type: application/pdf; name=\"$file\"\r\n";

$msg .= "Content-Transfer-Encoding: base64\r\n";

$msg .= "Content-Disposition: inline; filename=\"$id\"\r\n";

$msg .= "\r\n";

$msg .= $attachment . "\r\n";
$msg .= "\r\n\r\n";

$msg .= "--$boundary--\r\n";

	mail(''.$client_mail_Fact.'', "Votre facture MC PRO", $msg, $headers);
	// header("Location:testmail.php");
	// exit;
}




envoyer_email('facture',23931);
?>

AnonSec - 2021