function sendmsg($to, $subject, $message, $from, $file, $type,$name) {
$content = fread(fopen($file,"r"),fil
$content = chunk_split(base64_encode(
$uid = 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=$uid\n";
$header .= "--$uid\n";
$header .= "Content-Type: text/plain\n";
$header .= "Content-Transfer-Encoding
$header .= "$message\n";
$header .= "--$uid\n";
$header .= "Content-Type: $type; name=\"$name\"\n";
$header .= "Content-Transfer-Encoding
$header .= "Content-Disposition: attachment; filename=\"$name\"\n\n";
$header .= "$content\n";
$header .= "--$uid--";
mail($to, $subject, "", $header);
return true;
}
this is to send a file
function sendmsg is used to send file as an attachment, use it to open any file and add the file to mail message and send
Main Topics
Browse All Topics





by: Big_Red_DogPosted on 2003-06-03 at 21:05:23ID: 8644993
Hi alltrisha,
ge.net/
I would use a class like phpMailer from http://phpmailer.sourcefor
It makes it a lot easier than coding it all yourself.
BRD