ID:               35804
 Updated by:       [EMAIL PROTECTED]
 Reported By:      heini_net at gmx dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Mail related
 Operating System: Windows 2003
 PHP Version:      5.1.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2005-12-25 22:09:32] heini_net at gmx dot de

Description:
------------
hi,

i have write a php script for sending an email with an attachment.
under linux and php 4xx it works fine.
but under windows 2003 with php 5.1.1 the attachment image dont show
correct. the attachment size is only 3kb but the real size is more. and
if i save the attacment. so i can open the attachment and it show
correctly.

here the code :

<?php
function sendmail ($Sender,$Senderadresse, $Empfaenger, $Betreff,
$Mitteilung,$Dateiname, $Dateibezeichnung,$Dateityp)
{
$Header = "From: $Sender <$Senderadresse>"; 
$lb="\r\n";
$Trenner = md5(uniqid(time())); 
$Header .= $lb; 
$Header .= "MIME-Version: 1.0"; 
$Header .= $lb; 
$Header .= "Content-Type: multipart/mixed; boundary=$Trenner"; 
$Header .= $lb." ".$lb; 
$Header .= "This is a multi-part message in MIME format"; 
$Header .= $lb.$lb;
$Header .= "--$Trenner"; 
$Header .= $lb; 
$Header .= "Content-Type: text/plain"; 
$Header .= $lb; 
$Header .= "Content-Transfer-Encoding: 8bit"; 
$Header .= $lb.$lb; 
$Header .= $Mitteilung;
$Header .= $lb; 
$Header .= "--$Trenner"; 
$Header .= $lb; 
$Header .= "Content-Type: $Dateityp; name=$Dateibezeichnung"; 
$Header .= $lb; 
$Header .= "Content-Transfer-Encoding: base64"; 
$Header .= $lb; 
$Header .= "Content-Disposition: attachment;
filename=$Dateibezeichnung"; 
$Header .= $lb.$lb; 
$Dateiinhalt = fread(fopen($Dateiname, "r"), filesize($Dateiname)); 
$Header .= chunk_split(base64_encode($Dateiinhalt)); 
$Header .= $lb.$lb;
$Header .= "--$Trenner--"; 


 if (mail($Empfaenger, $Betreff,"", $Header)){ $Header =
nl2br($Header);
echo $Header; return "true"; }

}

?>



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35804&edit=1

Reply via email to