Renommer CGI-MAILER

Signaler
Messages postés
171
Date d'inscription
jeudi 15 avril 2004
Statut
Membre
Dernière intervention
18 juillet 2007
-
Messages postés
192
Date d'inscription
dimanche 23 janvier 2005
Statut
Membre
Dernière intervention
10 août 2009
-
Bonjour,






 






J’utilise un formulaire pour envoie d’email  ‘NukeStyles Contact Plus’ pour PHPNUKE





 




Le script en général marche très bien.


Mais quand je reçois un email envoyer avec ce formulaire il
est écrit « DE ‘CGI-MAILER’.



 




Peut-on changer ça par l’adresse email de l’expéditeur ou
autres…



 




Cordialement,

3 réponses

Messages postés
947
Date d'inscription
mercredi 19 novembre 2003
Statut
Membre
Dernière intervention
5 avril 2008
3
Regarde du coté de la licence, si ont t'interdit d'enlever ce credit, c'est que tu n'a pas le droit de le faire.

Si tu as le droit de motifier le credit, la réponse se situe dans la lecture des sources, à toi de jouer.
Messages postés
171
Date d'inscription
jeudi 15 avril 2004
Statut
Membre
Dernière intervention
18 juillet 2007

Bonjour,
Voila j’ai résolu le problème plus ajout d’un champ Tel.


Le code modifier n’est pas écrit comme les pro je ne suis qu’un débutant dans le php.

<?php    
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
        die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._CONTACTUS."";
$index = 1;

function ns_info() {
global $module_name, $sitename, $prefix, $dbi;
$result = sql_query("select address from ".$prefix."_ns_contact_add", $dbi);
list($address) = sql_fetch_array($result, $dbi);
$address = FixQuotes(nl2br($address));
echo "\";
echo \"----
";
echo "$address";
echo "

";
}

function ns_phone() {
global $module_name, $sitename, $prefix, $dbi;
echo "\";
$result = sql_query(\"select pid, phone_name, phone_num from \".$prefix.\"_ns_contact_phone order by phone_name\", $dbi);
    while(list($pid, $phone_name, $phone_num) = sql_fetch_array($result, $dbi)) {
echo \"----
";

echo "$phone_name:, \";
echo \"$phone_num, \";
    }
echo "

";
}

function ns_form() {
global $module_name, $sitename, $prefix, $dbi;
include("header.php");
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
$result_s = sql_query("select show_add from ".$prefix."_ns_contact_show", $dbi);
list($show_add) = sql_fetch_array($result_s, $dbi);
if ($show_add == 1) {
echo "

<center>"._ADDRESSINFO."</center>
";
ns_info();
echo "<hr>";
}
$result_p = sql_query("SELECT * FROM ".$prefix."_ns_contact_phone", $dbi);
$num = sql_num_rows($result_p, $dbi);
if ($num > 0) {
echo "

<center>"._PHONEINFO."</center>
";
ns_phone();
echo "<hr>";
}
echo "
<center>"._FORMHEADER." $sitename</center>

";
if (is_user($user)) {
$result_ui = sql_query("select name, uname, email from ".$user_prefix."_users where uname='$cookie[1]'", $dbi);
list($yn, $yun, $ye) = sql_fetch_row($result_ui, $dbi);}if ($yn !"") { $ns_un $yn; } else { $ns_un = $yun; }
echo "<form action="modules.php?name=$module_name" method="post"";
echo "name="contact_plus">";
echo "\";
echo \"----
"._YOURNAME.": ";
echo ", \";
////////////////////Nouveau champ telephone //////////////////////
//////////////////////////////////////////////////////////////////
echo \"----
"._YOURTEL.": ";
echo ", \";
///////////////fin du nouveau champ telephone/////////////////////
//////////////////////////////////////////////////////////////////
echo \"----
";
echo ""._YOUREMAIL.":
";
echo ", \";
echo \"----
";
echo ""._PLEASESELECT.":
";
echo "<select name=\"dpid\">";
echo "<option value=\"\" selected>---------------------------------";
echo "<option value=\"\">";

$result_s = sql_query("select did, dept_name, dept_email from ".$prefix."_ns_contact_dept order by dept_name", $dbi);
while(list($did, $dept_name, $dept_email) = sql_fetch_array($result_s, $dbi)) {

    
echo "<option value=\"$did\">$dept_name";
    }
echo "<option value=\"\">";
echo "</select>, \";
echo \"----
";
echo ""._YOURMESSAGE.":
";
echo "<textarea cols=\"95\" name=\"message\" rows=\"22\" ></textarea>, \";
echo \"----
";
echo "";
echo "";
echo "&nbsp;&nbsp;";
echo "
</form>";
echo "
";
Closetable();
include("footer.php");
}

function ns_send($dpid, $cname, $from, $email, $message) {
global $module_name, $sitename, $prefix, $dbi;
include("header.php");
if(ereg("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$from)) {
} else {
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
echo"
<center>"._INVALIDEMAIL.":

";
echo"$from

"._INVALIDEMAIL2."";
echo"

"._PLEASEGO."";
echo"

";
echo"[ "._BACK." ]</center>
";
CloseTable();
include ("footer.php");
exit;
}
if ($dpid == "") {
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
echo"
<center>"._SELECTDEPARTMENT."

";
echo""._PLEASEGO3."";
echo"

";
echo"[ "._BACK." ]</center>
";
CloseTable();
include ("footer.php");
exit;
}
if ($message == "") {
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
echo"
<center>"._NOMESSAGE."

";
echo""._PLEASEGO2."";
echo"

";
echo"[ "._BACK." ]</center>
";
CloseTable();
include ("footer.php");
exit;
}
$result = sql_query("select dept_name, dept_email from ".$prefix."_ns_contact_dept where did='$dpid'", $dbi);
list($dept_name, $dept_email)=sql_fetch_row($result, $dbi);
$department = $dept_name;
$department = stripslashes(trim($department));
$subject = $department;
$from = strip_tags(trim($from));
$message = stripslashes(trim($message));

$TextVar1="Objet d'intervention";

$header = "From: $TextVar1\r\n" .
       'X-Mailer: PHP/' . phpversion() . "\r\n" .
       "MIME-Version: 1.0\r\n" .
       "Content-Type: text/html; charset=utf-8\r\n" .
       "Content-Transfer-Encoding: 8bit\r\n\r\n";

/*
$header  = ""._FROM.": "._CONTACTFORM." - $cname <$from>\r\n";
$header .= "\n";
$header .= ""._VISITOR.": $cname <$from>\r\n\n";
$header .= ""._TODEPARTMENT.": $department\r\n\n";
$header .= ""._MESSAGE.":\r\n";
$header .= "\n==============================================================";
*/

@$send=mail($dept_email,$subject," Nom : $cname
Email : $from

$message
",$header);

if ($send == 1) {
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
echo "
";
echo "

"._THANKYOUFOR." $sitename";
echo "

"._EMAILSENT."
"._GETBACK."

";
echo "<center>[ "._HOME." ] - ";
echo "[ "._CONTACTFORM." ]</center>
";
echo "
";
CloseTable();
include ("footer.php");
} else {
OpenTable();
echo "<center>"._CONTACTUS."</center>";
CloseTable();
OpenTable();
echo"<center>"._ERROR2."";
echo"
"._TRYAGAIN."
";
echo"[ "._BACK." ]</center>";
CloseTable();
include ("footer.php");
}
exit();
include("footer.php");
}

$TextNomPlusTel="$cname.
Telephone : $ctel";
switch ($op) {

    case "ns_send":
   ns_send($dpid, $TextNomPlusTel, $from, $email, $message);

    break;

    default:
    ns_form();
    break;

}

?>

Cordialement,
Messages postés
192
Date d'inscription
dimanche 23 janvier 2005
Statut
Membre
Dernière intervention
10 août 2009

Faut modifier les headers des mails qu'il envoie

GRUNENBERGER Benoît

www.UnrealNetwork.net