boutils 10 tahun lalu
induk
melakukan
4547dd8737
1 mengubah file dengan 4 tambahan dan 12 penghapusan
  1. 4 12
      mail.php

+ 4 - 12
ajax/phpinfo.php → mail.php

@@ -5,20 +5,12 @@ ini_set('display_errors', 1);
 ini_set('display_startup_errors', 1);
 error_reporting(E_ALL);
 
-
 $headers  = 'MIME-Version: 1.0' . "\r\n";
 $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
+$headers .= 'From: Manche Numérique <ftth@manchenumerique.fr>' . "\r\n";
 
-$email = 'ftth@manchenumerique.fr';
-
-// En-têtes additionnels
-$headers .= 'From: Manche Numérique <'.$email.'>' . "\r\n";
-
-// Envoi
-$to='francoisbeaufils@gmail.com';
-
-$resultat = mail($to, 'sujet', 'body', $headers);
+$to       = 'francoisbeaufils@gmail.com, timothy.thiebot@manche.fr';
+$resultat = mail($to, 'Test Email', 'This is an amazing content.', $headers);
 
-echo 'resultat: '.$resultat;
-phpinfo();
+echo 'Email sent, result is : '.$resultat;
 ?>