IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

[Mail] Problème envoi formulaire par mail


Sujet :

Langage PHP

  1. #1
    Membre régulier
    Inscrit en
    Février 2003
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 219
    Points : 72
    Points
    72
    Par défaut [Mail] Problème envoi formulaire par mail
    Bonjour,

    J'essai d'envoyer un formaulaire par mail mais rien ne se passe !!
    Pour l'instant je traite uniquement les champs texte pour mon essai !!

    La réponse doit être très simpliste !!

    Merci

    Voici mes sources

    Services.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    <form name="Formulaire_Mail" action="EnvoiMail.php" method="post">
    <table width="853" height="931" id="tabGeneral">
      <tr>
        <td height="72" colspan="4" class="GrosTitredePageGris"><div align="left">Nos Services en ligne </div></td>
      </tr>
     
      <tr>
        <td width="73" height="40" align="center" valign="top">
        <p align="left" class="InfosSites">&nbsp;</p>    </td>
     
        <td width="244" align="center" valign="top"><form id="form1" name="form1" method="post" action="">
          <label>
            <div align="left">
              <input type="radio" name="optChoix" value="radiobutton" />
              <span class="InfosSites">Devis</span></div>
          </label>
        </form>
        </td>
        <td width="520" align="center" valign="top"><form id="form2" name="form2" method="post" action="">
          <label>
            <div align="left">
              <input type="radio" name="optChoix" value="radiobutton" />
              <span class="InfosSites">Commande</span></div>
          </label>
        </form>    </td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top" class="LienImportant"><div align="left">Vous</div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><form id="form3" name="form3" method="post" action="">
          <label>
          <div align="left">Client chez Mannespièces / Mannesfrance :      </div>
          </label>
        </form>    </td>
        <td align="center" valign="top"><div align="left">
          <select name="cmbClient" size="1" id="cmbClient">
            <option>OUI</option>
            <option>NON</option>
          </select>
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form4" name="form4" method="post" action="">
            <label>Numéro Client :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtNum" type="text" id="txtNum" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form5" name="form5" method="post" action="">
            <label>Société :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtSociete" type="text" id="txtSociete" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form6" name="form6" method="post" action="">
            <label>Nom :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtNom" type="text" id="txtNom" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form7" name="form7" method="post" action="">
            <label>Prénom :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtPrenom" type="text" id="txtPrenom" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form8" name="form8" method="post" action="">
            <label>E-mail :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtMail" type="text" id="txtMail" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form9" name="form9" method="post" action="">
            <label>Adresse :</label>
            <label></label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtAdresse" type="text" id="txtAdresse" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form10" name="form10" method="post" action="">
            <label>Téléphone :</label>
          </form>
          </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtTelephone" type="text" id="txtTelephone" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left" class="LienImportant">Votre v&eacute;hicule </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form11" name="form11" method="post" action="">
            <label>Numéro de Série du Type (G)</label>
            <label></label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <select name="cmbNumSerie" id="cmbNumSerie">
            <option selected="selected">WDB</option>
            <option>WDC</option>
            <option>VSA</option>
            <option>WDF</option>
          </select>
          <input name="txtNumSerie" type="text" id="txtNumSerie" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form12" name="form12" method="post" action="">
            <label>Date de 1ère mise en circulation :</label>
          </form>
          </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtMiseEnCircu" type="text" id="txtMiseEnCircu" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left" class="LienImportant">Produits</div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form13" name="form13" method="post" action="">
            <label>Désignation :</label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtDes1" type="text" id="txtDes1" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form14" name="form14" method="post" action="">
            <label>Référence :</label>
            <label></label>
          </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <select name="cmbRef1" id="cmbRef1">
            <option selected="selected">- - -</option>
            <option>Mannespi&egrave;ces</option>
            <option>Mercedes</option>
                      </select>
          <input name="txtRef1" type="text" id="txtRef1" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
          <form id="form15" name="form15" method="post" action="">
            <label>Quantité :</label>
          </form>
          </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtQte1" type="text" id="txtQte1" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top" class="TextedePage"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form13" name="form13" method="post" action="">
              <label>D&eacute;signation :          </label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtDes2" type="text" id="txtDes2" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form14" name="form14" method="post" action="">
              <label>R&eacute;f&eacute;rence :          </label>
              <label></label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <select name="cmbRef2" id="cmbRef2">
            <option selected="selected">- - -</option>
            <option>Mannespi&egrave;ces</option>
            <option>Mercedes</option>
          </select>
          <input name="txtRef2" type="text" id="txtRef2" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form15" name="form15" method="post" action="">
              <label>Quantit&eacute; :          </label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtQte2" type="text" id="txtQte2" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top" class="TextedePage"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form13" name="form13" method="post" action="">
              <label>D&eacute;signation :          </label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtDes3" type="text" id="txtDes3" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form14" name="form14" method="post" action="">
              <label>R&eacute;f&eacute;rence :          </label>
              <label></label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <select name="cmbRef3" id="cmbRef3">
            <option selected="selected">- - -</option>
            <option>Mannespi&egrave;ces</option>
            <option>Mercedes</option>
          </select>
          <input name="txtRef3" type="text" id="txtRef3" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td align="center" valign="top" class="TextedePage"><div align="left">
            <form id="form15" name="form15" method="post" action="">
              <label>Quantit&eacute; :          </label>
            </form>
        </div></td>
        <td align="center" valign="top"><div align="left">
          <input name="txtQte3" type="text" id="txtQte3" />
        </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left" class="TextedePage">Pour plus de 3 pi&egrave;ces, merci de nous contacter par t&eacute;l&eacute;phone ou de laisser un commentaire ... </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left">
          <form id="form16" name="form16" method="post" action="">
            <label>
              <textarea name="txtCommentaire" id="txtCommentaire"></textarea>
              </label>
          </form>
          </div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left"></div></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="top">&nbsp;</td>
        <td colspan="2" align="center" valign="top"><div align="left">
          <form id="form17" name="form17" method="post" action="">
            <div align="center">
              <input name="cmdReinitialiser" type="reset" id="cmdReinitialiser" value="Reinitialiser" />
              &nbsp;&nbsp;&nbsp;
              <input name="cmdEnvoyer" type="submit" id="cmdEnvoyer" value="Envoyer" />
              </div>
          </form>
        </div></td>
      </tr>
     
    </table>
      </form>
    EnvoiMail.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    <body>
     
    <?php 
     
     
     
    $Num = $_POST['txtNum']; 
    $Societe = $_POST['txtSociete'];
    $Nom = $_POST['txtNom']; 
    $Prenom = $_POST['txtPrenom'];
    $Mail = $_POST['txtMail']; 
    $Adresse=$_POST['txtAdresse'];
    $Telephone=$_POST['txtTelephone']; 
     
     
    $NumSerie=$_POST['txtNumSerie'];
    $MiseEnCircu=$_POST['txtMiseEnCircu'];
     
    $Des1=$_POST['txtDes1'];
     
    $Ref1=$_POST['txtRef1'];
    $Qte1=$_POST['txtQte1'];
     
    $Des2=$_POST['txtDes1'];
     
    $Ref2=$_POST['txtRef1'];
    $Qte2=$_POST['txtQte1'];
     
    $Des3=$_POST['txtDes1'];
     
    $Ref3=$_POST['txtRef1'];
    $Qte3=$_POST['txtQte1'];
     
    $Commentaire=$_POST['txtCommentaire'];
     
     
    $Destinataire = "nicolas.giltaire@mannes.fr" ; 
    $Sujet = "Devis test" ; 
    $Message = "Client n° $Num \n 
    Société : $Societe \n
    Nom : $Nom \n
    Prénom : $Prenom \n
    Adresse : $Adresse \n
    Téléphone : $Telephone \n \n
    Véhicule concerné : \n
    N° de série : $NumSerie \n
    Mis en circualtion : $MiseEnCircu \n \n
    Détail de la demande : \n
    Désignation 1 : $Des1 \n
    Référence 1 : $Ref1 \n
    Le client en souhaite $Qte1 \n \n
    Désignation 2 : $Des1 \n
    Référence 2 : $Ref1 \n
    Le client en souhaite $Qte1 \n \n
    Désignation 2 : $Des1 \n
    Référence 2 : $Ref1 \n
    Le client en souhaite $Qte1 \n \n \n
    Commentaire du client : $Commentaire ";
    $Entetes = "From: $Mail " ; 
    mail($Destinataire, $Sujet, $Message, $Entetes); 
     
     ?> 
     
    </body>

    Merci

  2. #2
    Expert confirmé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Décembre 2003
    Messages
    3 549
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Décembre 2003
    Messages : 3 549
    Points : 4 625
    Points
    4 625
    Par défaut
    Vérifie la valeur de retour de mail
    Boost ftw

  3. #3
    Membre émérite
    Avatar de yiannis
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    1 494
    Détails du profil
    Informations personnelles :
    Âge : 59
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 1 494
    Points : 2 791
    Points
    2 791
    Par défaut
    pourtant tu as les formes pour ton envoi

    non le probleme est que tu fait un <form> a chaque elements. Tu n'en as pas besoin un seul <form> envoie tout.
    "Ce besoin de remords qui précède le Mal, que dis-je ! qui le crée..." E. CIORAN

  4. #4
    Membre régulier
    Inscrit en
    Février 2003
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 219
    Points : 72
    Points
    72
    Par défaut
    Citation Envoyé par loufoque
    Vérifie la valeur de retour de mail
    ??

  5. #5
    Membre régulier
    Inscrit en
    Février 2003
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 219
    Points : 72
    Points
    72
    Par défaut
    Citation Envoyé par yiannis
    pourtant tu as les formes pour ton envoi

    non le probleme est que tu fait un <form> a chaque elements. Tu n'en as pas besoin un seul <form> envoie tout.
    j'essai de suite en espérant ne pas perdre la mise en page !!

  6. #6
    Membre régulier
    Inscrit en
    Février 2003
    Messages
    219
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 219
    Points : 72
    Points
    72
    Par défaut
    Citation Envoyé par yiannis
    pourtant tu as les formes pour ton envoi

    non le probleme est que tu fait un <form> a chaque elements. Tu n'en as pas besoin un seul <form> envoie tout.
    MERCI !!! 8)

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [MySQL] Envoi formulaire par mail
    Par arsenik360 dans le forum PHP & Base de données
    Réponses: 18
    Dernier message: 10/03/2012, 18h06
  2. [AC-2003] Envoi Formulaire par Mail
    Par LOUISXIV dans le forum IHM
    Réponses: 3
    Dernier message: 19/08/2010, 14h38
  3. Envoie formulaire par mail
    Par seyflo dans le forum Balisage (X)HTML et validation W3C
    Réponses: 13
    Dernier message: 15/06/2010, 17h19
  4. envoi formulaire par mail + pj
    Par nico2323 dans le forum ASP.NET
    Réponses: 4
    Dernier message: 10/10/2008, 14h43
  5. problème envoi pdf par mail
    Par ver_for dans le forum IHM
    Réponses: 4
    Dernier message: 01/06/2008, 09h18

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo