Jump to content


NixNod

Member Since 22/02/2004
Offline Last Active 30/07/2005, 09:16
-----

Posts I've Made

In Topic: Criação De Formulário

19/03/2004, 05:59

Dai vc faz o seguinte ...

mail($para,"Assunto","Mensagem","From: $nomedeusernoform\r\n Cc: e-mail@provedora.dominio\r\n");

In Topic: Formmail Com Arquivo Anexo

19/03/2004, 05:54

Tenta este aqui .. eu achei na internet ....

<?php
$boundary = strtotime('NOW');
   
$headers = "From: Eu <meu@email.com.br>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"" . $boundary . "\"\n";

$msg = "--" . $boundary . "\n";
$msg .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$msg .= "Content-Transfer-Encoding: quoted-printable\n\n";

$msg .= "Aqui eu escrevo o texto do email\n";

$msg .= "--" . $boundary . "\n";
$msg .= "Content-Transfer-Encoding: base64\n";
$msg .= "Content-Disposition: attachment; filename=\"imagem.gif\"\n\n";

ob_start();
   readfile("imagem.gif");
   $enc = ob_get_contents();
ob_end_clean();

$msg_temp = base64_encode($enc). "\n";
$tmp[1] = strlen($msg_temp);
$tmp[2] = ceil($tmp[1]/76);

for ($b = 0; $b <= $tmp[2]; $b++) {
    $tmp[3] = $b * 76;
    $msg .= substr($msg_temp, $tmp[3], 76) . "\n";
}

unset($msg_temp, $tmp, $enc);

mail("para@email.com.br", "Assunto", $msg, $headers);

?>

;)
exit(0);

IPB Skin By Virteq