• 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.


  • is anybody have an idea ?