Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/11/2006, 04:51
lioned69
 
Fecha de Ingreso: agosto-2006
Mensajes: 40
Antigüedad: 17 años, 9 meses
Puntos: 0
Pregunta Porque no m envia el mail?

El objetivo es enviar un correo al webmaster por si hubiera algun problema o algo para comunicarlo. Por que no funciona el código k tengo a continuacion? Podria ser problema del servidor k lo tiene deshabilitado o algo de ese estilo? El mensaje que me escribe es el de que se ha enviado correctamente. Gracias por ayudar a introducirme en este mundillo

Código:
<?
if ($_POST['asunto'])
    {
        if (mail("[email protected]", $_POST['asunto'], $_POST['mensaje']))
        {
            echo "<table width='100%' height='100%'><tr><td align=center>";
            echo "<center>Tu mensaje se ha enviado correctamente</center>";
            echo "</td></tr></table>"
        }
        else
        {
            echo "<table width='100%' height='100%'><tr><td align=center>";
            echo "<center>Tu mensaje no se ha podido enviar al webmaster</center>";
            echo "</td></tr></table>";
        }
    }
    else
    {
?>
<table align="center" width="100%" height="70%">
    <tr>
        <td align='center'>
            <form name="form2" method="post" onSubmit="return validar(this)" action="correo.php">
                <table width="70%" height=70% align="center">
                    <tr>
                        <td colspan="2">
                            <font size="4" face="Cooper Black" color="#00CCFF">Enviar correo al webmaster</font>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr style='color:#3366ff;'>
                        </td>
                    </tr>
                    <tr>
                        <td height="40" width="180">
                            <font face="Comic Sans MS" size="2"><b>Asunto:</b></font>
                        </td>
                        <td>
                            <input type="text" name="asunto" tabindex="1" size="25">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <font face="Comic Sans MS" size="2"><b>Mensaje:</b></font>
                        </td>
                        <td rowspan=2>
                            <textarea name="mensaje" rows="6" cols="70"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr style='color:#3366ff;'>
                        </td>
                    </tr>
                    <tr>
                        <td height="40" colspan="2" align="right">
                            <input name="btnEntrar" type="submit" id="btnEntrar" value="Enviar">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr style='color:#3366ff;'>
                        </td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
</table>

Última edición por lioned69; 20/11/2006 a las 05:04