Originariamente inviato da satifal
Per quanto contorto come giro, dovrebbe funzionare.
Posta il form html completo che stai utilizzando.
Tieni presente che questo è un form che si autoinvia

Codice PHP:
$data_localeS = $_POST['WebDate_ScrivimiS']; // Questo codice DOVREBBE RICHIAMARE la funzione che si trova in questa pagina - WebDate_ScrivimiS()  
$nomeS = stripslashes(htmlentities(ucfirst(trim($_POST['nomeS']))));
$cittaS = stripslashes(htmlentities(ucfirst(trim($_POST['cittaS'])))); 
$suoemailS = htmlentities($_POST['suoemailS']); 
$suoemailS = str_replace(" ","",$suoemailS); // Toglie gli spazi interni nella mail
$messaggioS = stripslashes(htmlentities(trim($_POST['messaggioS']))); 
$validatorS = stripslashes(htmlentities(trim($_POST['validatorS'])));


$headersS  = "MIME-Version: 1.0\r\n";
$headersS .= "content-type: text/html; charset=iso-8859-1\r\n";
$headersS .= "X-Mailer: PHP\n"; 
$headersS .= "From:io<miamail@gmail.com>\r\n"; 

$headers1S  = "MIME-Version: 1.0\r\n";
$headers1S .= "content-type: text/html; charset=iso-8859-1\r\n";
$headers1S .= "X-Mailer: PHP\n"; 
$headers1S .= "From:$suoemailS\r\n";  

//Messaggio del Cliente a me 
$aS = "io<miamail@gmail.com>";   
$oggettoS = "Successo del Cliente";  //Le mail vanno formattate con HTML 
$messaggioMailS = "<html>
<head> 
</head>
<body>
<table>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:17px;color:#000080;font-weight:bold;\">
SUCCESSO DEL CLIENTE :</p>
</td>
</tr>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:11px;color:#000080;\">$data_localeS</p>
</td>
</tr>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:14px;color:#000080;\">




<div style=\"width:auto;height:4px;\"><font style=\"color:#666666;\">Nome:</font>$nomeS</div>


<div style=\"width:auto;height:4px;\"><font style=\"color:#666666;\">Email:</font>$suoemailS</div>


<div style=\"width:auto;height:4px;\"><font style=\"color:#666666;\">Citt&agrave;:</font>$cittaS</div>


<div style=\"width:auto;height:4px;\"><font style=\"color:#666666;\">Country:</font>".$countries[$two_letter_country_code][1]."</div>


<div style=\"width:auto;height:4px;\"><font style=\"color:#666666;\">Ip:</font><font style=\"font-family:arial,verdana;font-size:13px;\">$ip</font>$bandierina</div>




<p style=\"color:#666666;margin-bottom:10px;\">Successo:</p>
$messaggioS




</p>
</td>
</tr>
</table> 
</body>
</html>";
//Invio della mail 
mail($aS,$oggettoS,$messaggioMailS,$headers1S); 

//Invio e-mail di ringraziamento al Cliente
$suoemailS = "$suoemailS";
$oggetto1S = "Complimenti!"; 
$messaggioMail1S = "<html>
<head>
</head>
<body>
<table>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:17px;color:#000080;font-weight:bold;\">
- RISPOSTA AUTOMATICA -</p>
</td>
</tr>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:11px;color:#000080;\">$data_localeS</p>
</td>
</tr>
<tr>
<td>
<p style=\"font-family:arial,verdana;font-size:14px;color:#000080;padding-top:15px;\">


Ciao[b]$nomeS[/b],




Complimenti per il tuo successo!






A presto,

 
<font style=\"font-family:arial,verdana;font-size:11px;font-style:italic;color:#000080;\">by Alberti.Gruppo ALVEO</font>


<a href=\"http://www.gruppoalveo.altervista.org\" style=\"font-family:arial,verdana;font-size:13px;color:#0000ff;text-decoration:none;\">[url]www.gruppoalveo.altervista.org[/url]</a>
</p>
</td>
</tr>
</table>
<table>


<tr>
<td>
<p style=\"background-color:#e4e4e4;width:1000px;height:20px;line-height:20px;font-family:arial;font-size:12px;color:#9e0001;\">
----- Original Message -----</p>
</td>
</tr>
<tr>
<td>
<p style=\"background-color:#ededed;width:1000px;\">


$messaggioMailS</p>
</td>
</tr>
</table>
</body>
</html>";
//Invio della mail 
mail ($suoemailS,$oggetto1S,$messaggioMail1S,$headersS);
?>


<div id="headerS">Scrivi il tuo Successo!</div>
<form method="post" name="mioformSxxx" id="mioFS" action="<?php echo $_SERVER['PHP_SELF'];?>" onkeyup="highlightS(event)" onsubmit="return (nomeCampoS() &amp;&amp; messaggioCampoS() &amp;&amp; validatoreCampoS());">

       <fieldset id="contenuto1"> 
             <div class="linea1-S">
                 <label class="nomi1ScrivS">Tuo NOME<span class="asterisco1">*</span></label>
          <input type="text" name="nomeS" class="campi1-S" value="<?php echo($_SESSION['nomeS'])?>" onkeyup="contaNomeS(); nomeCampoS(); parolaNoS()" onblur="nomeCampoS(); parolaNoS(); this.value=this.value.replace(/[\s]*/,'')" /> 
           [img]faccine/cxonfuso.gif[/img]
                        [img]faccine/ixmpossibile.gif[/img]
                      [img]faccine/txestardo.gif[/img]
                  <div class="N">  
           <div id="nomeS"></div><div id="contaNomeS"></div><div id="nomeCampoS"></div>
             </div>
                 </div>
                    <div class="linea1-S">
           <label class="nomi1-S">Tua CITT&Agrave;</label>
       <input type="text" name="cittaS" class="campi1-S" value="<?php echo($_SESSION['cittaS'])?>" onkeyup="contaCittaS(); parolaNoS()" onblur="parolaNoS(); this.value=this.value.replace(/[\s]*/,'')" />
                    [img]faccine/pxiange.gif[/img]
                    [img]faccine/bxacio.gif[/img]
          [img]faccine/fxelice.gif[/img]
          <div class="N"> 
          <div id="cittaS"></div><div id="contaCittaS"></div>
         </div>
           </div>
                  <div class="linea1-S">
             <label class="nomi1-S">Tua EMAIL</label>
           <input type="text" name="suoemailS" class="campi1-S" value="<?php echo($_SESSION['suoemailS'])?>" onkeyup="contaUserS(this); contaEmailS(); validaMailS()" onblur="validaMailS(); this.value=ignoreSpacesS(this.value)" />   
                [img]faccine/rxide.gif[/img]
           [img]faccine/oxcchiolino.gif[/img]
                    [img]faccine/cxiao.gif[/img]
            <div class="N"> 
           <div id="contaUserS"></div><div id="contaEmailS"></div><div id="validaMailS"></div>
                  </div>
                 </div>
        <div class="linea1-S">
        <div class="formattazione1-S">
        <div id="bottoneG">
      [url="javascript:insert_tagS('G');"]<span style="font-weight: bold;">G</span>[/url] 
      </div>
      <div id="bottoneC"> 
      [url="javascript:insert_tagS('C');"]<span style="font-size: 16px; font-style: italic;">C</span>[/url]    
      </div>
      <div id="bottoneS"> 
      [url="javascript:insert_tagS('S');"]<span style="text-decoration: underline;">S</span>[/url]
      </div> 
      
<select class="campoColori1" name="colori" onchange="insert_tagS('COLOR',this.options[this.selectedIndex].value);this.selectedIndex=0;">
<option>Color</option> 
<option class="cayenne-bg" value="cayenne">Cayenne</option>
<option class="rosso-bg" value="rosso">Rosso</option>
<option class="verde-bg" value="verde">Verde</option>
<option class="grigio-bg" value="grigio">Grigio</option>
 </select>
      </div> 
            </div>  
  
      <div id="contSXS">
        <span class="testoMess">Testo</span><span class="asterisco1">*</span>
        

         

  <div id="charCountS">Rimanenti</div><span class="formattaNumeroS"><div id="ContatoreS">1000</div></span>
<div id="charCount1-S">caratteri</div>
</div>

<div id="messaggioS"></div><div id="messaggioCampoS"></div>

<textarea name="messaggioS" id="txtScrivimi1-S" cols="0" rows="0" onkeyup="contaS(this); messaggioCampoS(); parolaNoS()" onblur="messaggioCampoS(); parolaNoS(); this.value=this.value.replace(/[\s]*/,'')"><?php echo($_SESSION['messaggioS'])?></textarea>

<div id="contDXScrivimi1">      
   [img]faccine/pxaura.gif[/img]
   </div>
   
     <div id="footer-basso">
    
     <div id="footer-sxScrivimi1">
    <span class="campiObbS">Campi obbligatori</span><span class="asterisco1">*</span>
                    </div>
                    <div id="footer-ctScrivimi1">
                <button type="submit" name="invia" id="invia" class="manina-guest">Invia</button>
                        </div>
                        
                        <div id="footer-dxScrivimi1">
           <span class="redS">Scrivi questo codice</span>
                     

    <input type="text" name="validatorS" class="validatorS" onkeyup="contaValidS(); validatoreCampoS()" onblur="validatoreCampoS(); this.value=ignoreSpacesS(this.value)" />
                  <script type="text/javascript">Captcha();</script>
                    </div>
                <div id="contaValidS"></div><div id="validatoreCampoS"></div> 
    </div>    
    </fieldset> 
      </form>