Bonjour,
J'aimerais avoir un peu d'aide pour mon formulaire créé dans flash en
appelant un fichier php. Tout a l'air de bien se dérouler quand je met
les info ca me dit votre email a b ien été envoyé mais je ne reçoit
jamais d'email.
Pourriez-vous m'aider je vous met le code que j'ai fait .
Merci
flash:
label_01 = "Votre nom";
label_02 = "Email";
label_03 = "No de téléphone";
label_04 = "Commentaires";
label_05 = "Veuillez remplir tous les champs";
text1 = label_01;
text2 = label_02;
text3 = label_03;
text4 = label_04;
text5 = label_05;
this.onEnterFrame = function() {
text_field_1.onSetFocus = function() {
if (text1 == label_01) {
text1 = "";
}
};
text_field_1.onKillFocus = function() {
if (text1== "") {
text1 = label_01;
};
};
text_field_2.onSetFocus = function() {
if (text2 == label_02) {
text2 = "";
}
};
text_field_2.onKillFocus = function() {
if (text2 == "") {
text2 = label_02;
}
};
text_field_3.onSetFocus = function() {
if (text3 == label_03) {
text3 = "";
}
};
text_field_3.onKillFocus = function() {
if (text3 == "") {
text3 = label_03;
}
};
text_field_4.onSetFocus = function() {
if (text4 == label_04) {
text4 = "";
}
};
text_field_4.onKillFocus = function() {
if (text4 == "") {
text4 = label_04;
}
};
};
function verifMail() {
// fonction classique de vérification de l'email.
if (text2.length >= 7) {
if (text2.indexOf("@") > 0) {
if ((text2.indexOf("@")+2) < text2.lastIndexOf(".")) {
if (text2.lastIndexOf(".") < (text2.length - 2)) {
return (true);
}
}
}
}
return (false);
}
function verifMsg() {
// on stocke le message à tester afin de ne pas
// altérer l'affichage pendant le test.
msgCheck = text4;
// vérification et modification des retour de ligne
for (i=0; i<text4.length; i++) {
if (msgCheck.substring(i, 2) == "\r") {
msgCheck =
msgCheck.substring(1, i-2) + "\n" + (msgCheck.substring(i+2,
msgCheck.length - i + 2));
}
}
text4 = msgCheck;
}
function envoyer() {
// fonction générale de vérification et d'envoi du mail.
if ((text1 == "") or (text3 == "") or (text4 == "")) {
text5 = "Tous les champs ne sont pas remplis...";
} else {
if (verifMail()) {
verifMsg();
text5 = "Le message est en cours d'envoi...";
loadVariablesNum("mail.php",_self, "POST");
text5 = "Le message a été envoyé avec succès.";
} else {
text5 = "Entrez un email valide";
}
}
}
mail.php:
<?php
$msgComplet = $text4;
$msgComplet .= "Auteur: $text1\n";
$msgComplet .= "Email : $text2\n";
$headers = "From: flashmail");
$headers .= "Reply-To: $text2\r\n"
mail("info@xxx.ca", $mailSujet, $msgComplet, $headers);
?>
Mon champs texte dynamique text5 m'indique bien le email a été envoyé avec succès...
Merci de votre aide c assez urgent.
Nace