Bonjour,
J'ai mis en place le formulaire de contact "Contact Us Mail Form v1.1" (wirewolf).
Cependant je ne reçois aucun email qui est envoyé depuis ce formulaire.
J'ai essayé d'envoyer un mail en étant logué, sans être loggué, j'ai changé la fonction cpg_mail en mail (tout court), j'ai vérifié l'adresse d'envoi d'email etc...
Rien n'y fait.
Cependant, les ecards fonctionnent, et les notifications de commentaires aussi ???
D'où pourrait donc provenir le problème ?
Merci
J'ai utilisé le formulaire à 18h23 heure française.
Essayez ce script CONTACT.PHP
Placez-le à la racine de votre Galerie.
<?php
/*************************
Cobbled together by Billy Bullock
Tested on Coppermine 1.4.4
Reference link for code = "http://www.ibdhost.com/contact/"
lil moded by PYAP
**************************/
define('IN_COPPERMINE', true);
require('include/init.inc.php');
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
pageheader('Contact Me');
// start first table content
starttable("800", 'Contactez-nous', 1);
?>
<tr>
<td class="tableb" valign="top" align="left">
Merci de nous contacter via notre Galerie.
<br>
</td>
</tr>
<?php
endtable();
// end first table content
// start comment feedback content
starttable("800", 'Contact Info', 1);
?>
<tr>
<td class="tableb" valign="top" align="left">
* Tous les champs sont requis.
</td>
</tr>
<tr>
<td class="tableb" valign="top" align="center">
<form method="post" action="sendmail.php">
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
* Votre Nom : <br />
<input type="text" name="visitor" size="35" />
<br />
* Votre Email :<br />
<input type="text" name="visitormail" size="35" />
<br />
Sujet :<br />
<input type="text" name="subject" size="35" />
<br /> <br />
<br />
* Votre Message :
<br />
<textarea name="notes" rows="8" cols="60"></textarea>
<br />
<input type="submit" value="Postez ! Go !" />
<br />
</form>
</td>
</tr>
<?php
endtable();
// end comment feedback content
pagefooter();
ob_end_flush();
?>
Ne reste plus qu'à faire un lien vers votre-galerie;com/contact.php ( IMPORTANT !!! voir le Post suivant, j'ai zappé un truc ;D )
PYAP
Auparavant vous devez placer les codes suivants :
SENDMAIL.PHP
<?php
/*************************
Cobbled together by Billy Bullock
Tested on Coppermine 1.4.4
Reference link for code = "http://www.ibdhost.com/contact/"
lil moded by PYAP
**************************/
$visitor = $_REQUEST['visitor'] ;
$visitormail = $_REQUEST['visitormail'] ;
$subject = $_REQUEST['subject'] ;
$notes = $_REQUEST['notes'] ;
// change address to your root CPG gallery below 4 times
if (!isset($_REQUEST['visitormail'])) {
header( "Location: http://www.pays-dignois.com/galerie/contact.php" );
}
elseif(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {
header( "Location: http://www.votre.com/galerie/contacterror.php" );
}
elseif (empty($visitor) || empty($visitormail) || empty($notes)) {
header( "Location: http://www.votre.com/galerie/contacterror.php" );
}
else {
$todayis = date("l, F j, Y, g:i a") ;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Poste par : $visitor ($visitormail)\n
Sujet : $subject \n
Message : $notes \n
Autre Info : IP = $ip \n
Navigateur Info : $httpagent \n
Depuis la Page : $httpref \n
";
$from = "Par : $visitormail\r\n";
// Indiquez votre adresse email / change to your email
mail("pyap@pays-dignois.com", $subject, $message, $from);
header( "Location: http://www.votre.com/galerie/thankyou.php" );
}
?>
THANKYOU.PHP
<?php
// lil moded by PYAP
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Contact');
// your actual page content starts here
starttable("800", 'Merci and Thanks', 1);
?>
<tr>
<td class="tableb" valign="top" align="center"><br />
Nous vous remercions pour votre email :-) <br />
<i>Thank you for your email.</i>
<br><br><center></center>
</td>
</tr>
<?php
endtable();
// your actual page content ends here
pagefooter();
ob_end_flush();
?>
CONTACTERROR.PHP
<?php
// lil moded by PYAP
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Contact');
// start page content
starttable("800", '<b><font color="red">E R R E U R</font>', 1);
?>
<tr>
<td class="tableb" valign="top" align="center"><b><font color="red">E R R E U R</b><br>
Vous oubliez certains champs obligatoires !<br />
Faites la correction en cliquant le bouton <b>BACK</b> de votre navigateur.<br />
Merci.<br /><br />
<i>Please fill in all required fields.<br /><br />
Press the <b>BACK</b> button in your browser and try again.<br /><br />
Thank you.</i></font><br />
<br><center></center>
</td>
</tr>
<?php
endtable();
// end page content
pagefooter();
ob_end_flush();
?>
That's All
PYAP
sinon, il y a aussi le version 2 du plugin contact qui n'utilisait pas captcha mais une autre protection (mettre la réponse à une opération simple)
Quote from: Frantz on December 05, 2007, 06:39:10 PM
sinon, il y a aussi le version 2 du plugin contact qui n'utilisait pas captcha mais une autre protection (mettre la réponse à une opération simple)
Oui j'ai déjà essayé d'installer cette version mais il semble que ça ma désactive la feuille de style quand je l'installe :o
Je viens de refaire le test et j'ai toujours ce problème (plus d'image de fond, plus de police etc....) ???
Bon finalement ça marche mais j'ai dû faire quelques modifs :
J'ai commenté ce code :$messageproper = "---------------------------------------------------------<br />
Date: $date<br />
Name: $sender_name<br />
Email: $sender_email<br />
Address: $ip<br />
Subject: $sender_subject<br />
Comments: $sender_comments<br />
ARIN Whois: http://ws.arin.net/cgi-bin/whois.pl?queryinput=$ip <br />
User Agent: $server_agent<br />
---------------------------------------------------------";
Supprimé :
$messageproper,
'text/plain'
Remplacé $comments
par
$sender_comments
Va savoir pourquoi, maintenant ça marche ???