Thread Confixx 3 - Webmail: Falsche Darstellung von Umlauten (25 answers)
Opened by Alex at 2005-09-08 20:54

Alex
 2005-09-10 07:02
#17566 #17566
User since
2003-12-04
285 Artikel
BenutzerIn
[default_avatar]
Glaube ich habe was gefunden, in der email_attach.php:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
include_once("auth.php");
include("email_functions.php");
include("email_config.php");

/*
echo '<pre>';
print_r($_POST);
exit;
*/

/*
if (!$content) exit;

if ($charSet[$attachmentNumber]) $contentType[$attachmentNumber] .= ";\r\n\tcharset=\"$charSet[$attachmentNumber]\"";
if (isset($name[$attachmentNumber])) $contentType[$attachmentNumber] .= ";\r\n\tname=\"$name[$attachmentNumber]\"";

if ($contentTransferEncoding[$attachmentNumber] == "quoted-printable") $content[$attachmentNumber] = quoted_printable_decode($content[$attachmentNumber]);
if ($contentTransferEncoding[$attachmentNumber] == "base64") $content[$attachmentNumber] = base64_decode($content[$attachmentNumber]);

$contentDisposition = ($inLine[$attachmentNumber] == "true") ? "inline" : "attachment";
if (isset($fileName[$attachmentNumber])) $contentDisposition .= "; filename=$fileName[$attachmentNumber]";

header("Content-Type: $contentType[$attachmentNumber]");
header("Content-Transfer-Encoding: 8bit");
header("Content-Disposition: $contentDisposition");
echo $content[$attachmentNumber];
*/

if($id && e_connect())
{
$header = imap_headerinfo($mbox, $id);
$mail_uniq = md5($header->subject . $header->date);
if($mail_uniq != $uniq)
{
imap_close($mbox);
die("error");
}

$structure = imap_fetchstructure($mbox, $id);

$ha = headerArray($structure->parts[$part]);

if($ha['parameters']['charset'])
{
$ha['type'] .= ";\r\n\tcharset=\"" . $ha['parameters']['charset'] . "\"";
}
if($ha['parameters']['name'])
{
$ha['type'] .= ";\r\n\tname=\"" . $ha['parameters']['name'] . "\"";
}

$body = imap_fetchbody($mbox, $id, ($part+1));

if($ha['encoding'] == "quoted-printable")
{
$body = quoted_printable_decode($body);
}
if($ha['encoding'] == "base64")
{
$body = base64_decode($body);
}
$contentDisposition = $inline ? "inline" : "attachment";
if($ha['dparameters']['filename'])
{
$contentDisposition .= "; filename=" . $ha['dparameters']['filename'];
}
elseif ( strlen($filename) )
{
$contentDisposition .= "; filename=$filename";
}

//echo "<pre>"; print_r($ha);
//echo $contentDisposition;

header("Content-Type: " . $ha['type']);
header("Content-Transfer-Encoding: 8bit");
header("Content-Disposition: $contentDisposition");
echo $body;

imap_close($mbox);
}

?>


Nur, was tun?
<center>Schönen Gruß, Alex
Mit dem Computer geht alles viel schneller - es dauert nur ein bißchen länger!
</center>

View full thread Confixx 3 - Webmail: Falsche Darstellung von Umlauten