yo tengo este codigo pero no me funciona
una swf enviando las variables a enviar.php pero no me fun
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body><?
require '_mailf.php';
$nombre=trim($nombre);
$email=trim($email);
$comentarios=trim($comentarios);
$error=0;
if(!$error)
{
$body="\nFormulario en linea\n\n";
$body=$body . "Nombre: $nombre\n";
$body=$body . "Email: $email\n";
$body=$body . "Comentarios: $comentarios\n";
xmail($from,$to,$subject,$body);
$cfgFrom=$email;
$cfgTo="
[email protected]";
$cfgSubject="Forma via Web";
xmail($cfgFrom,$cfgTo,$cfgSubject,$body);
echo "<H1>Formulario Enviado!</H1>\n";
echo "<P>Gracias, su informaci&oacute;n ha sido enviada\n";
}
?>
</html>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
function xmail($from,$to,$subject,$core_msg)
{
$cmd_line=sprintf("sudo /var/qmail/bin/qmail-inject");
$fp=popen($cmd_line,"w");
$temp=sprintf("From: %s\n",$from);
$len=strlen($temp);
$ret_p=fputs($fp,$temp,$len);
$temp=sprintf("To: %s\n",$to);
$len=strlen($temp);
$ret_p=fputs($fp,$temp,$len);
$temp=sprintf("Subject: %s\n",$subject);
$len=strlen($temp);
$ret_p=fputs($fp,$temp,$len);
$temp=sprintf("\n%s\n",$core_msg);
$len=strlen($temp);
$ret_p=fputs($fp,$temp,$len);
pclose($fp);
}
function is_valid_mail($mailaddr)
{
/* Validate e-mail address */
/* Default return value is TRUE */
$rval=1;
/* Invalid characters */
$na="`~!#$%^&*()+=[]{};':\"<,>?/\| ";
$na_found=0;
$at_found=0;
$at_found=strpos($mailaddr,"@");
for($counter=0;$counter<strlen($na);$counter++)
{
$pos=strpos($mailaddr,substr($na,$counter,1));
if(!is_string($pos) && $pos) $na_found++;
}
if($na_found>0 || !$at_found )
{
$rval=0;
}
return($rval);
}
?>
</body>
</html>