Ik ben al 2 uren bezig met onderstaande probleem.
Ik verzend een gemaakt pdf document en een html tekst. Het document zit netjes in de bijlage maar de tekst in het mailbericht is weg. Ik heb al veel dingen geprobeerd, alleen alles draait op niks uit.
Graag jullie hulp.
Ik verzend een gemaakt pdf document en een html tekst. Het document zit netjes in de bijlage maar de tekst in het mailbericht is weg. Ik heb al veel dingen geprobeerd, alleen alles draait op niks uit.
Graag jullie hulp.
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
35
36
37
38
39
40
41
42
43
44
45
46
47
| <? $boundary = md5(microtime()); $text = "Dear Sir, Maddam,\n Your email client does not support HTML."; $html = "<html><body><table bgcolor=\"#cccccc\"><tr><td>".$inhoud."</td></tr></table></body></html>"; $email = "***"; $afzender = "info@bla.com"; $afzendernaam = "Bla.com"; $subject = "Bla bla subject"; $boundary = "Dit is de Boundary van de mail 01234"; $headers = "From: ".$afzendernaam." <".$afzender.">\n"; $headers .= "Subject: ".$subject."\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative;\n"; $headers .= "\tboundary=\"".$boundary."\"\n"; $headers .= "Content-Type: application/pdf;\n"; $headers .= "\tname=\"proforma_factuur.pdf\"\n"; $headers .= "Content-Transfer-Encoding: base64\n"; $headers .= "Content-Disposition: attachment;\n"; $headers .= "\tfilename=\"proforma_factuur.pdf\"\n\n"; $headers .= $b. "\n\n"; $headers .= "--".$boundary."\n"; $headers .= "Content-Transfer-Encoding: 7bit\n"; $headers .= "--".$boundary."\n"; $message = "--".$boundary."\n"; $message .= "Content-Type: text/plain; charset=us-ascii\n"; $message .= "Content-Transfer-Encoding: 7bit\n"; $message .= "\n"; $message .= $text."\n"; $message .= "\n"; $message .= "--".$boundary."\n"; $message .= "Content-Type: text/html\n"; $message .= "charset=iso-8859-1\n"; $message .= "\n"; $message .= $html."\n"; $message .= "\n"; $message .= "--".$boundary."--"; ail($email, $subject, $message, $headers); ?> |