Me encargaron un rediseño para un buscador, el sistema ya está creado desde hace unos años atras, el problemá está en que ahora quieren que cuando se registre un anuncio desde el formulario, sea enviado un mail de aviso al administrador.
Explico un poco sobre cómo hicieron el formulario:
es un formulario que tiene por action:
Código :
<?php echo $editFormAction; ?>
y esto es lo que viene en el header:
Código :
<?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addMessage")) { $insertSQL = sprintf("INSERT INTO cliente (firstName, lastName, country, state, email, website,title,keywords, comment, `date`, marker,type) VALUES (%s, %s,%s ,%s, %s,%s,%s, %s, %s, %s, %s,1)", GetSQLValueString($_POST['firstName'], "text"), GetSQLValueString($_POST['lastName'], "text"), GetSQLValueString($_POST['country'], "text"), GetSQLValueString($_POST['state'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['website'], "text"), GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['keywords'], "text"), GetSQLValueString($_POST['comment'], "text"), GetSQLValueString($_POST['date'], "text"), GetSQLValueString($_POST['date2'], "date")); mysql_select_db($database, $accelgbook); $Result1 = mysql_query($insertSQL, $accelgbook) or die(mysql_error()); $insertGoTo = "ingreso_added.php?date=".$HTTP_POST_VARS['date'].""; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?>
He intentado añadir estas lineas antes del "?>", pero nada

Código :
$destinatario = "[email protected]"; mail($destinatario, $Result1);
Espero haber sido lo suficientemente claro para ver si me pueden echar una mano con este asuntito.
Desde ya, gracias por el interes.