Naviguation dans :  Perl  JavaScript  Détail  - wsCaD_chgMail.cgi?Appel=newAdmin
 présentée :  par cas d'appel   par traitements 
Retour à l'accueil
  
 
 Requêtes 

 wsCaD_chgMail 

 newAdmin 

Requêtes de Ça-déménage.com
Requête d'envoi de mail
Demande d'inscription professionnel


 toClient  Demande d'inscription professionnel — Envoie le mail approprié
Syntaxe toClient(IN)
Paramètres 
nom  type  Description 
IN  IN Liste des identifiants complétés par leur mot de passe
— Liste de la forme : "/<ident1>,<mdp1>/<ident2>,<mdp2>/.../<identN>,<mdpN>"
Perl : scalaire passé par référence – JavaScript : tableau à 1 élément
retourne  OUT  0 : Traitement correct
non nul : Erreur de traitement
Fonctions util. 
 getBox Construit l'adresse e-mail d'émission
 Mailer Envoi d'un mail


Code Perl 


sub toClient {local($IN) = @_; 
 local($From,$To); $From = $To = &getBox('contact'); 
 local $x = ""; 
 $x .= "To: ".$To."\nFrom: ".$From."\nSubject: Ça-déménage.com - Nouveau\nContent-Type: text/plain; charset=iso-8859-1\n\n";
 $x .= "E-mail : ".$wwEmail."\nContact : ".$wwIn[1]."\nAdresse : \n".$wwIn[2]."\n";
 return &Mailer($x);
}
Code JavaScript 


function toClient(IN) { 
 var From,To; From = To = getBox('contact'); 
 var x = ""; 
 x += "To: "+To+"\nFrom: "+From+"\nSubject: Ça-déménage.com - Nouveau\nContent-Type: text/plain; charset=iso-8859-1\n\n";
 x += "E-mail : "+wwEmail+"\nContact : "+wwIn[0][1]+"\nAdresse : \n"+wwIn[0][2]+"\n";
 return Mailer(x); return 0
}