View Single Post
Sponsorlu Bağlantılar
Zoque.Forum
Advertisement
Old 15.01.2007   #1 (permalink)
magos
 
Üyelik Tarihi: 09.11.2006
Yer: izmir
Mesaj: 200
ataçlı email göndermek istiyorum

selam arkadaslar. ben sitemde mail formu ile insanların bana mail göndermesini saglıyorum. ben ona ekstra olarak dosyada ekleyebilmelerini istiyorum. bu konuda yardımcı olabilir misiniz? ben şöyle bir şeyleri arastırdım buldum ama calısmadı. belki yardımcı olur sizede benim göremedigim hatalar falan olabilir. ii çalışmalar herkese

HTML Code:
function sendmsg($to, $subject, $msgtext, $from, $file, $type)
{
$fp = fopen($file,"rb");
$fcontent = fread($fp ,filesize($file));
fclose($fp);
$content = chunk_split(base64_encode($fcontent));
$sep = strtoupper(md5(uniqid(time())));
$name = basename($file);
$header = "From: $from\nReply-To: $from\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/mixed; boundary=$sep
\n";
$body .= "--$sep\n";
$body .= "Content-Type: text/plain\n";
$body .= "Content-Transfer-Encoding: 8bit\n\n";
$body .= "$msgtext\n";
$body .= "--$sep\n";
$body .= "Content-Type: $type; name=\"$file\"\n";
$body .= "Content-Transfer-Encoding: base64\n";
$body .= "Content-Disposition: attachment; filename=
\"$file
\"\n";
$body .= "$content\n";
$body .= "--$sep--";
if (mail($to, $subject, $body, $header)) {
return true;
} else {
return false;
}
}
magos şu an çevrimdışı   Mesajdan alıntı yaparak yeni bir cevap ekleyin