Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/03/2008, 15:55
reimonfranco
 
Fecha de Ingreso: febrero-2006
Mensajes: 858
Antigüedad: 18 años, 2 meses
Puntos: 4
No puedo enviar e-mail

Que tal,

Tengo este codigo que yo hize que envia un email con un texto adjunto, pero a la hora de subirlo al servidor, no jala...

Esto es lo que sale:

Warning: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. in C:\blabla\blabla\tacoketo.com\blabla\enviar un correo electronico con adjunto.php on line 12
El correo no fué enviado con éxito!

Y este es mi codigo:

Código PHP:
<html>
<head>
<title>Php5</title>
</head>
<body>
<?
$nombrearchivo 
"testamento.txt";
$mensaje file_get_contents($nombrearchivo);
$para "[email protected]";
$asunto "Prueba email";
$encab "Content-disposition: attachment; nombrearchivo=testamento.txt\n";
if (!
$enviarcorreo mail($para,$asunto,$mensaje,$encab)) {
echo 
"El correo no fué enviado con éxito!";
}
else {
echo 
"El correo ha sido enviado con éxito";
}
?>
</body>
</html>

SALUDOS
GRACIAS
__________________
*La amistad se multiplica cuando se divide*