Netgate SG-1000 microFirewall

Author Topic: email sending issue  (Read 1485 times)

0 Members and 1 Guest are viewing this topic.

Offline Carltonson-sky

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
email sending issue
« on: March 16, 2016, 04:10:49 am »
Hello everybody,

i installed a pfsense with the snapshot 2.3 with a remote freeradius and phpmyadmin server. i wrote a script where i retrieve a php form and i send email to the person that wrote his own. My concern is that i can't send email to the address.

I don't find the configuration file of the smtp.
in php.ini i tried writing : smtp = smtp.sfr.fr  and  sendmail_path =/sbin/sendmail -t -i but without success
i configure on the GUI into system -> advanced -> notification-> email parameters. if i try to send an test email it's working.
in my script i use mail()
How to send email with a php script please ?

Thanks in advance

here the code to send email :

Code: [Select]
$email=$_POST['auth_mail'];
$sujet = 'Authentification portail captif';
        $destinataire = $_POST['auth_mail'];
$headers .= "From: authentification@valthorens.com";
$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"";
$message_mail="Bonjour,<br><br>Voici les identifiant et mot de passe pour vous connecter au portail captif  pour une durée de 30 min Bonne journée !<br>login : {$email}<br>Mot de passe : {$mdp}";

if (verifEmail(false))
{
include 'captiveportal-welcome2.html';
}
else
{
mail($destinataire, $sujet, $message_mail, $headers);
}
if (mail($destinataire,$sujet,$message_mail))
{
        echo "L'email a bien été envoyé.";

}
else
{
        echo "Une erreur est survenue lors de l'envois de l'email.";
 
include 'captiveportal-welcome2.html';
}
cheers.
« Last Edit: March 17, 2016, 08:07:05 am by Carltonson-sky »

Offline Carltonson-sky

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: email sending issue
« Reply #1 on: April 07, 2016, 03:23:33 am »
is anybody have an idea ?