Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    Problema con modulo email inserire ALLEGATO

    Ciao Ragazzi ho un problema ancora con quel modulo email di prima come faccio ad inserire un allegato?
    e il form diventerà enctype="multipart/formData"?
    Aiutatemi







    codice:
    <%
    theSchema="http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig=server.CreateObject("CDO.Configuration")
    cdoConfig.Fields.Item(theSchema & "sendusing")= 2
    cdoConfig.Fields.Item(theSchema & "smtpserver")="out.virgilio.it"
    cdoConfig.Fields.Update
    
    Set cdoMessage=Server.CreateObject("CDO.Message")
    cdoMessage.Configuration=cdoConfig
    cdoMessage.From=Request.Form("Email")
    cdoMessage.To="webmaster@siriosystem.it"
    cdoMessage.Subject=Request.Form("RichiestaOfferta")
    cdoMessage.TextBody=Request.Form("NomeAzienda") & VbCrLf &_ 
                        "INDIRIZZO:" & Request.Form("Indirizzo") & VbCrLf &_
    					"NAZIONE:" & Request.Form("Nazione") & VbCrLf &_
    					"C.A.P.:" & Request.Form("Cap") & VbCrLf &_
    					"CITTA:" & Request.Form("Citta") & VbCrLf &_
    					"REFERNTE:" & Request.Form("Referente") & VbCrLf &_
    					"TELEFONO:" & Request.Form("Telefono") & VbCrLf &_
    					"FAX:" & Request.Form("Fax") & VbCrLf &_
    					"VIDEO CONFERENZA:" & Request.Form("Videoconferenza") & VbCrLf &_
    					"RICHIESTA OFFERTA NUMERO:" & Request.Form("RichiestaOfferta") & VbCrLf &_
    					"DEL:" & Request.Form("DataOfferta") & VbCrLf &_
    					"DESCRIZIONE:" & Request.Form("textareaDescrizione") & VbCrLf &_
    					"DISEGNO NUMERO:" & Request.Form("DisegnoNumero") & VbCrLf &_
    					"MATERIALE:" & Request.Form("textareaMateriale") & VbCrLf &_
    					"TRATTAMENTI:" & Request.Form("textareaTrattamenti") & VbCrLf &_
    					"PEZZI CORRENTI:" & Request.Form("PezziCorrenti") & VbCrLf &_
    					"NUOVO PROGETTO:" & Request.Form("NuovoProgetto") & VbCrLf &_
    					"DATA INIZIO SERIE:" & Request.Form("DataInizioserie") & VbCrLf &_
    					"FABBISOGNO ANNUO:" & Request.Form("Fabbisogno") & VbCrLf &_
    					"LOTTI:" & Request.Form("Lotti") & VbCrLf &_
    					"ATTREZZATURE:" & Request.Form("Attrezzature") & VbCrLf &_
    					"CAMPIONATURA:" & Request.Form("Campionatura") & VbCrLf &_
    					"NUMERO CAMPIONI:" & Request.Form("NumeroCampioni") & VbCrLf &_
    					"IMBALLO:" & Request.Form("Imballo") & VbCrLf &_
    					"TERMINE PRESENTAZIONE OFFERTA:" & Request.Form("TermineOfferta") & VbCrLf &_
    					"NOTE:" & Request.Form("textareaNote") & VbCrLf &_
    					"ALLEGATO:" & Request.Form("file")
    cdoMessage.Send
    
    Set cdoMessage=Nothing
    Set cdoConfig=Nothing
    %>

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Devi prima caricarlo sul server e poi prenderlo e metterlo come allegato alla email.

    Roby

  3. #3
    Mi stai dicendo roby che devo fare l'upload?

  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Se il file che intendi allegare è già sul server no, se invece lo carichi dal tuo pc deve andare prima sul server per essere spedito.

    Roby

  5. #5
    Roby scusami ma potresti postarmi la soluzione a qusto problema ho questo cliente con il fiato sul collo ti posto il codice anche del form ti sarei grato se mi dessi una mano!!!

    codice:
    <form action="invio.asp" method="post" name="frm_message" id="frm_message" enctype="multipart/form-data">
    <table width="399" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Nome Azienda: </td>
          <td><input name="NomeAzienda" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Indirizzo:</td>
          <td><input name="Indirizzo" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Nazione:</td>
          <td><input name="Nazione" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">C.A.P.:</td>
          <td><input name="Cap" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Citt&agrave;:</td>
          <td><input name="Citta" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Referente:</td>
          <td><input name="Referente" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Telefono:</td>
          <td><input name="Telefono" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Fax:</td>
          <td><input name="Fax" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">E-mail:</td>
          <td><input name="Email" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Videoconferenza:</td>
          <td><input name="Videoconferenza" type="text" size="40"></td>
        </tr>
      </table>
        
    
    </p>
      <table width="886" border="1" bordercolor="#666666">
        <tr>
          <td width="263" bgcolor="#CCFFCC">RICHIESTA D'OFFERTA N&deg; </td>
          <td width="271"><input name="RichiestaOfferta" type="text" size="40"></td>
          <td width="38" bgcolor="#CCFFCC">DEL</td>
          <td width="358"><input name="DataOfferta" type="text" size="40"></td>
        </tr>
      </table>
      <p style="color: #0000FF; font-weight: bold"><u>Con la presente siamo a chiederVi Vs. migliore offerta per il seguente particolare:</u></p>
      <table width="200" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Descrizione:</td>
        </tr>
        <tr>
          <td><textarea name="textareaDescrizione" cols="60" rows="5"></textarea></td>
        </tr>
      </table>
      
    
    </p>
      <table width="384" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Disegno N&deg;: </td>
          <td><input name="DisegnoNumero" type="text" size="40"> </td>
        </tr>
      </table>
      
    
    </p>
      <table width="200" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Materiale:</td>
        </tr>
        <tr>
          <td><textarea name="textareaMateriale" cols="60" rows="5" id="textareaMateriale"></textarea></td>
        </tr>
      </table>
      
    
    </p>
      <table width="200" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Trattamenti:</td>
        </tr>
        <tr>
          <td><textarea name="textareaTrattamenti" cols="60" rows="5" id="textareaTrattamenti"></textarea></td>
        </tr>
      </table>
      <p style="font-weight: bold; color: #0000FF"><u>Tipologia Pezzi: </u></p>
      
      <table width="419">
       <tr>
         <td bgcolor="#FFFFCC">
           <div align="left" style="font-weight: bold">
             <label>
              Pezzi Correnti : </label>
           </div></td>
         <td><input name="PezziCorrenti" type="text" size="2" maxlength="2"></td>
         <td class="Stile1">Specificare SI o NO </td>
       </tr>
       <tr>
         <td bgcolor="#FFFFCC">
           <div align="left" style="font-weight: bold">
             <label>
              Nuovo Progetto : </label>
           </div></td>
         <td><input name="NuovoProgetto" type="text" size="2" maxlength="2"></td>
         <td class="Stile1">Specificare SI o NO</td>
       </tr>
       <tr>
         <td bgcolor="#FFFFCC"><div align="left" style="font-weight: bold">Data inizio serie: </div></td>
         <td><input name="DataInizioSerie" type="text" size="10" maxlength="10"></td>
         <td></td>
       </tr>
     </table>
      <p style="font-weight: bold; color: #0000FF"><u>Quantit&agrave;:</u></p>
      <table width="444" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Fabbisogno annuo: </td>
          <td><input name="Fabbisogno" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Lotti:</td>
          <td><input name="Lotti" type="text" size="40"></td>
        </tr>
      </table>
    
      
    
    </p>
      <table width="855">
        <tr>
          <td width="133" bgcolor="#FFFFCC">
            <label>
            Attrezzature:</label>
          </td>
          <td width="46"><input name="Attrezzature" type="text" size="2" maxlength="2"></td>
          <td width="297"></td>
          <td width="48"></td>
          <td width="216" class="Stile1">Specificare SI o NO</td>
        </tr>
        <tr>
          <td bgcolor="#FFFFCC">
            <label>
            Campionatura:</label>
          </td>
          <td><input name="Campionatura" type="text" size="2" maxlength="2"></td>
          <td bgcolor="#FFFFCC">Se &quot;SI&quot; indicare numero campioni richiesti : </td>
          <td><input name="NumeroCampioni" type="text" size="5" maxlength="3"></td>
          <td class="Stile1">Specificare SI o NO</td>
        </tr>
      </table>
      <p style="font-weight: bold; color: #0000FF"><u>Condizioni di acquisto:</u></p>
      <table width="538" border="1" bordercolor="#666666">
        <tr>
          <td bgcolor="#CCFFCC">Resa:</td>
          <td><input name="Resa" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Imballo:</td>
          <td><input name="Imballo" type="text" size="40"></td>
        </tr>
        <tr>
          <td bgcolor="#CCFFCC">Termine presentazione offerta: </td>
          <td><input name="TermineOfferta" type="text" size="40"></td>
        </tr>
      </table>
      <p style="font-weight: bold; color: #0000FF"><u>Spazio riservato al richiedente (Note):</u></p>
      <table width="200" border="1" bordercolor="#666666">
        <tr>
          <td><textarea name="textareaNote" cols="60" rows="5" id="textareaNote"></textarea></td>
        </tr>
    	<tr>
    	<td>Allega Disegno:</td>
    	<td><input type="file" name="file" /></td>
    	</tr>
      </table>
      
    
    </p>
      <table width="322" border="0">
        <tr>
          <td width="165">
            <div align="left">
              <input name="Submit1" type="submit" id="Submit1" value="Invia Richiesta">
            </div></td>
          <td width="264">
            <div align="left">
              <input name="Submit2" type="reset" id="Submit2" value="Cancella dati form">
            </div></td>
        </tr>
      </table>
    </form>

  6. #6
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Puoi usare lo script per l'upload di baol.
    Sul forum trovi centinaia di esempi.

    Roby

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.