| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 
 | <?php
function send_confirm($id, $array){
	global $cache_mails_auto;
 
	$email = stripslashes($array['ema']);
	$email = str_replace('mysql_query', '', $email);
	$titre = stripslashes($array['tit']);
	$titre = str_replace('mysql_query', '', $titre);
 
	$nom_mail = '';
	$email_mail = '';
 
	foreach($cache_mails_auto as $v){
		if($v['type'] == 1){
			$nom_mail = stripslashes($v['nom']);
			$email_mail = stripslashes($v['email']);
			$titre_mail = stripslashes($v['titre']);
			$message_mail = stripslashes($v['message']);
		}
	}
 
	$url = URL .'/confirmer_ann.php?code='. $id .'&email='. $email;
 
	$titre_mail = str_replace('<titre>', $titre, $titre_mail);
	$message_mail = str_replace('<titre>', $titre, $message_mail);
	$message_mail = str_replace('<url>', $url, $message_mail);
 
	//Entête du mail
 
	$header = "From: ". $nom_mail ." <". $email_mail.">\n";
	$header .= "Reply-To: ". $email_mail ."\n";
	$header .= "Content-Type: text/html; charset=\"utf-8\"\n";
	$header .= "Content-Transfer-Encoding: binary";
 
	mail($email, $titre_mail, $message_mail, $header);
	return true;
}
?> | 
Partager