Email avec fichier joint

Résolu
gilles4 Messages postés 3 Statut Membre -  
Séb08 Messages postés 18169 Date d'inscription   Statut Contributeur Dernière intervention   -
Bonjour:

j'ai un problème pour recevoir un fichier joint sur mon email à partir de mon site...le message est bien affiché mais pas de pièce jointe...le message est :subject : divers
realname : ddkdkdkskddser
email : gdn@yahoo.fr
comments : blalbalbla
MAX_FILE_SIZE : 1024
nom_du_fichier : F:\\Images\table.JPG toutes les données sont là ...mais pas de pièce jointe

J'utile un fichier hlml et un php pour l,envoie

quelqu'un pourrait m'aider

merci à l'avance
Configuration: Windows XP
Internet Explorer 7.0

1 réponse

  1. Séb08 Messages postés 18169 Date d'inscription   Statut Contributeur Dernière intervention   1 430
     
    slt,

    je copie colle tes fichiers car tu as créé un doublon en les postant .
    L'autre post va être supprimé.

    fichier html

    <form method=POST action="formmail.php">

    <input type=hidden name=subject value="formmail">
    <table>
    <tr><td>Nom et prénom:</td>
    <td><input type=text name=Name size=30></td></tr>
    <tr><td>Adresse:</td>
    <td><input type=text name=Adresse size=30></td></tr>
    <tr><td>Téléphone:</td>
    <td><input type=text name=Telephone size=30></td></tr>
    <tr><td>Email:</td>
    <td><input type=text name=Email size=30></td></tr>
    <tr><td colspan=2>Annonce:<br>
    <textarea COLS=50 ROWS=6 name=Annonce></textarea>
    </td></tr>

    </table><br>
    <FORM method="POST"action="mailto:mail@gdpac.com" ENCTYPE="multipart/form-data">
    <INPUT type=hidden name=MAX_FILE_SIZE VALUE=1024>
    <INPUT type=file name=nom_du_fichier><br><br>
    <INPUT type=submit value=Envoyer>
    <INPUT type=reset value=Effacer>
    </form>
    </div>

    et mon fichier Php

    <?php
    $TO = "mail@gdpac.com";

    $h = "From:client " . $TO;

    $message = "";

    while (list($key, $val) = each($HTTP_POST_VARS)) {
    $message .= "$key : $val\n";
    }
    mail($TO, $nom,$adresse,$telephone,$email,$annonce, $h);

    Header("Location: http://gdpac.com/merci.html");

    if (isset($node->files) && user_access('view uploaded files')) {
    // Add the attachments list to node body with a heavy
    // weight to ensure they're below other elements
    if (count($node->files)) {
    if (!$teaser && user_access('view uploaded files')) {
    $node->content['files'] = array(
    '#value' => theme('upload_attachments', $node->files),
    '#weight' => 50,
    );
    }
    }
    }
    break;
    ?>

    vous pourrez voir que je suis nul en infor.....

    Configuration: Windows XP
    Internet Explorer 7.0


    0