Caros Amigos,

Estou enviando e-mail a partir de um script PHP, mas o e-mail retorna com o
seguinte erro:

The original message was received at Fri, 25 May 2001 12:29:54 -0300
from nobody@localhost
----- The following addresses had permanent fatal errors -----
 [EMAIL PROTECTED]
----- Transcript of session follows -----
451 [EMAIL PROTECTED] reply: read error from mx5.uol.com.br.
... while talking to mx6.uol.com.br.:
>>> MAIL From:<[EMAIL PROTECTED]> SIZE=302
<<< 501 <[EMAIL PROTECTED]>... Sender domain must exist
501 [EMAIL PROTECTED] Data format error

Algu�m sabe o porque disso estar acontecendo?

Caso alguem entenda de PHP e queira dar uma olhada no meu script, ele est�
abaixo:

<?
$from = "[EMAIL PROTECTED]";
$mailheaders  = "From: $from\n";
$mailheaders .= "Reply-To: $from\n";
$mailheaders .= "Cc: $cc\n";
$mailheaders .= "X-Mailer: Sismail Web Email Interface\n";
$msg_body = stripslashes($body);
if ($attach != "none")
{
 $file = fopen($attach, "r");
 $contents = fread($file, $attach_size);
 $encoded_attach = chunk_split(base64_encode($contents));
 fclose($file);

 $mailheaders .= "MIME-version: 1.0\n";
 $mailheaders .= "Content-type: multipart/mixed; ";
 $mailheaders .= "boundary=\"Message-Boundary\"\n";
 $mailheaders .= "Content-transfer-encoding: 7BIT\n";
 $mailheaders .= "X-attachments: $attach_name";
 $body_top = "--Message-Boundary\n";
 $body_top .= "Content-type: text/plain; charset=US-ASCII\n";
 $body_top .= "Content-transfer-encoding: 7BIT\n";
 $body_top .= "Content-description: Mail message body\n\n";
 $msg_body = $body_top . $msg_body;
 $msg_body .= "\n\n--Message-Boundary\n";
 $msg_body .= "Content-type: $attach_type; name=\"$attach_name\"\n";
 $msg_body .= "Content-Transfer-Encoding: BASE64\n";
 $msg_body .= "Content-disposition: attachment;
filename=\"$attach_name\"\n\n";
 $msg_body .= "$encoded_attach\n";
 $msg_body .= "--Message-Boundary--\n";
}
mail($to, stripslashes($subject), $msg_body, $mailheaders);
include("db.inc");

$sql = "INSERT INTO emails(cnintnomes, assunto_email, mensagem_email,
data_email, anexo_email, usuario_email)
   VALUES ('$cnintnomes','$subject','$body',NOW(),'$attach','$usuario')";
 // Executa a consulta SQL e traz os resultados.
$sql_result = mysql_query($sql, $connection)
 or die ("<b>N�o foi poss�vel cadastrar o e-mail no hist�rico de e-mails
enviados,<br> mas o e-mail foi para o destinat�rio. </b>");
echo "
E-mail enviado com os seguintes dados:
Para: $nome
Assunto:  $subject
Mensagem: $body
";
?>


Assinantes em 25/05/2001: 2296
Mensagens recebidas desde 07/01/1999: 115134
Historico e [des]cadastramento: http://linux-br.conectiva.com.br
Assuntos administrativos e problemas com a lista: 
            mailto:[EMAIL PROTECTED]

Responder a