salve a tutti, ho realizzato una pagina con un form per l'invio delle email da parte dei clienti ma le mail a volte arrivano e a volte no!

questa è la pagina da dove mandare le email

questo è il codice...



Codice PHP:
<?php

  $error 
false;
  if (isset(
$HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
    
$name tep_db_prepare_input($HTTP_POST_VARS['name']);
    
$email_address tep_db_prepare_input($HTTP_POST_VARS['email']);
    
$telefono tep_db_prepare_input($HTTP_POST_VARS['telefono']);
    
$enquiry tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

    if (
tep_validate_email($email_address)) {

//se il cliente ha lasciato un recapito allora includilo nella email
    
if ($telefono <> '') { $recapito '[b]Recapito:[/b] ' $telefono '

'
; }
    else { 
$recapito '';}

//indirizzo IP
    
$indirizzo_ip $_SERVER['REMOTE_ADDR'];

      
tep_mail(STORE_OWNERSTORE_OWNER_EMAIL_ADDRESS'Richiesta preventivo''[b]Mittente:[/b] ' $name '

$recapito '[b]Richiesta:[/b] ' $enquiry '

$indirizzo_ip$name$email_address);

      
tep_redirect(tep_href_link('richiedi-preventivo.php''action=success'));
    } else {
      
$error true;

      
$messageStack->add('contact'ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    }
  }
?>

<html>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" valign="top"><?php echo tep_draw_form('contact_us'tep_href_link('richiedi-preventivo.php''action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
  
if ($messageStack->size('contact') > 0) {
?>
      <tr>
        <td><?php echo $messageStack->output('contact'); ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
<?php
  
}

  if (isset(
$HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">La tua richiesta è stata inviata! - Ti ringraziamo per la tua richiesta, verrai contattato quanto prima dal nostro Staff.

Per richieste urgenti chiamaci al N. 085 9769190 o invia un fax al N. 085 4988050

</td>
      </tr>
<?php
  
} else {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">Richiedi un preventivo!</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main">Cognome/Nome o Azienda</td>
              </tr>
              <tr>
                <td class="main"><?php echo tep_draw_input_field('name',  '',  'style="width: 400px"'); ?></td>
              </tr>
              <tr>
                <td class="main">Il tuo indirizzo email</td>
              </tr>
              <tr>
                <td class="main"><?php echo tep_draw_input_field('email''''style="width: 400px"'); ?></td>
              </tr>
              <tr>
                <td class="main">Recapito telefonico (non obbligatorio ma consigliato per permetterci di contattarti)</td>
              </tr>
              <tr>
                <td class="main"><?php echo tep_draw_input_field('telefono''''style="width: 400px"'); ?></td>
              </tr>
              <tr>
                <td class="main">La tua richiesta:</td>
              </tr>
              <tr>
                <td><?php echo tep_draw_textarea_field('enquiry''soft'368); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td align="right"><?php echo tep_image_submit('button_continue.gif'IMAGE_BUTTON_CONTINUE); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
  
}
?>
    </table></form></td>

</html>