Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Email sending issue

    2.3-RC Snapshot Feedback and Issues - ARCHIVED
    1
    2
    2.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Carltonson-sky
      last edited by

      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 :

      
      $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,
      
      Voici les identifiant et mot de passe pour vous connecter au portail captif  pour une durée de 30 min Bonne journée !
      login : {$email}
      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.

      1 Reply Last reply Reply Quote 0
      • C
        Carltonson-sky
        last edited by

        is anybody have an idea ?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.