if(mail("[email protected]","HOLA","texto")){ //si se envió el email header("Location: pagina.php"); }else{ echo "Error al intentar mandar un email"; }