first alpha
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
require_once 'log.php';
|
||||
|
||||
|
||||
function envoiMail($destinataire, $sujet, $text, $html=false)
|
||||
{
|
||||
|
||||
@ -9,20 +10,22 @@ function envoiMail($destinataire, $sujet, $text, $html=false)
|
||||
{
|
||||
$headers .= "Content-type: text/html; charset=UTF-8" . LF;
|
||||
}else
|
||||
{
|
||||
$headers .= "Content-type: text/plain; charset=UTF-8" . LF;
|
||||
}
|
||||
$headers .= "DATE: " . date( 'r' ) . LF . LF;
|
||||
|
||||
log_write(__FILE__ . __LINE__ . " Envoi d'un courriel à " . $courriel . "sujet:" . $sujet, INFO);
|
||||
log_write(__FILE__ . __LINE__ . " Envoi d'un courriel à " . $text . "sujet:" . $sujet, INFO);
|
||||
if( !mail($destinataire, $sujet, $text, $headers) ) //Sending mail
|
||||
{
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel n'est pas parti:" .$courriel . EOL . $sujet . EOL, ERROR);
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel n'est pas parti:" .$text . EOL . $sujet . EOL, ERROR);
|
||||
return 0;
|
||||
}else
|
||||
{
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel avec les pièces jointes est parti:" .$courriel . EOL, INFO);
|
||||
log_write(__FILE__ . EOL . __LINE__ . EOL . "Le courriel avec les pièces jointes est parti:" .$text . EOL, INFO);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user