Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

HTML mail i attachment (negde hoce, negde ne)???

[es] :: PHP :: HTML mail i attachment (negde hoce, negde ne)???

[ Pregleda: 2896 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Vas

Član broj: 27052
Poruke: 47
*.dialup.neobee.net.



Profil

icon HTML mail i attachment (negde hoce, negde ne)???02.11.2004. u 10:09 - pre 208 meseci
Molim da pogledate ovaj kod i kazete mi zasto je na @ptt.yu i na @yahoo.com sve u redu, tj. salje html mail i pdf fajl u attachmentu a na @t-online.de dobijem html kod, a umesto attachmenta brdo djubreta.


$filename = "./rechnung.pdf";
$handle = fopen($filename, 'rb');
$contents = fread($handle,filesize($filename));
fclose($handle);
$encoded = chunk_split(base64_encode($contents));

$seperator = md5(uniqid(time()));
$from = 'ADLER Export-Import WEB Shop < [email protected] >';
$header = '';
$header .= "From: $from\r\n";
$header .= "MIME-Version: 1.0\r\nContent-Type:"." multipart/mixed;boundary=\"$seperator\";\r\n";
$header .= "charset=\"iso-8859-1\"\r\nContent-Transfer-Encoding:"."7bit\r\n\n";
$header .= "If you are reading this, your mail client does not support MIME.\r\n\n";
$header .= "--$seperator\r\n";
$header .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$header .= "Content-Transfer-Encoding: 7bit\r\n\n";
$header .= $mailmessage."\r\n\n";
$header .= "--$seperator\r\n";
$header .= "Content-Type: application/pdf; name=\"rechnung.pdf\"\r\n";
$header .= "Content-Transfer-Encoding: base64\r\n";
$header .= "Content-Disposition: attachment\r\n\n";
$header .= $encoded."\r\n";
$header .= "--$seperator--\r\n";

[email protected]($uemail, "Your order form Adler WEB Shop", $mailmessage, $header);
if($chk) [email protected]($realaemail, "Order from $uname", $mailmessage, $header);
if(!$chk) echo "<p><b>Greska. Nije poslato!</b>";
 
Odgovor na temu

[es] :: PHP :: HTML mail i attachment (negde hoce, negde ne)???

[ Pregleda: 2896 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.