Ik wil een html mail met als bijlage een tweetal pdf bestanden. Dit gaat allemaal prima als ik ze open in een client als the bat en thunderbird, echter in outlook krijg ik alleen de codes te zien in het document en niet de bijlagen.
Ziet iemand iets fouts aan de headers?
Ziet iemand iets fouts aan de headers?
code:
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
| <?PHP $header = "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1\r\n"; $header .= "From: Bestlevel <me@me.nl>\r\n"; $header .= "Content-Type: multipart/mixed;\n"; $header .= "\tboundary= " . $boundary . "\n\n"; $header .= "This is a multi-part message in MIME format.\n\n"; $header .= "--" . $boundary . "\n"; $header .= "Content-Type: text/html;\n"; $header .= "\tcharset=\"iso-8859-1\"\n"; $header .= "Content-Transfer-Encoding: quoted-printable\n\n"; $header .= $inhoud . "\n\n"; $header .= "--" . $boundary . "\n"; $header .= "Content-Type: application/pdf;\n"; $header .= "\tname=\"proforma_factuur.pdf\"\n"; $header .= "Content-Transfer-Encoding: base64\n"; $header .= "Content-Disposition: attachment;\n"; $header .= "\tfilename=\"proforma_factuur.pdf\"\n\n"; $header .= $b. "\n\n"; //Invoegen attachment $header .= "--" . $boundary . "\n"; $header .= "Content-Type: application/pdf;\n"; $header .= "\tname=\"algemene_voowaarden.pdf\"\n"; $header .= "Content-Transfer-Encoding: base64\n"; $header .= "Content-Disposition: attachment;\n"; $header .= "\tfilename=\"algemene_voorwaarden.pdf\"\n\n"; $header .= $file_content . "\n\n"; //Invoegen attachment $header .= "--" . $boundary . "--"; ?> |
[ Voor 46% gewijzigd door Verwijderd op 01-03-2005 18:27 ]