Browse Source

Add php info to test emails

boutils 10 years ago
parent
commit
18aca3b743
1 changed files with 24 additions and 0 deletions
  1. 24 0
      ajax/phpinfo.php

+ 24 - 0
ajax/phpinfo.php

@@ -0,0 +1,24 @@
+<?php
+ini_set("SMTP", "mail.manchenumerique.fr");
+ini_set("sendmail_from", "ftth@manchenumerique.fr");
+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";
+
+$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);
+
+echo 'resultat: '.$resultat;
+phpinfo();
+?>