[php] html mailen

Pagina: 1
Acties:

  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
ik heb op mn page dit scriptje:
PHP:
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
<?
$msg = "<html>
        <head>
        <title>Een E-Card van $fromname!</title>
        </head>
        <body>
        <table class=form border=0 cellpadding=3 cellspacing=0>
         <tr>
          <td>
           [img]'$pic'[/img]
          </td>
          <td>
           <b>Aan:</b> $toname ($to)<br>
           <b>Van:</b> $fromname ($from)<p>
           <blockquote><b>$titel</b></blockquote>
           $tekst
           <blockquote><b>$afsluiting</b></blockquote>
          </td>
         </tr>
        </table>
        </body>
        </html>";
$subject  = "Een E-Card van $fromname!";
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $fromname <$from>\r\n";

mail($to, $subject, $msg, $headers);
?>

maar hij stuurt geen HTML, maar gewone text...
wat doe ik fout?

2 swim or not 2 swim, that's the question


  • Arjan A
  • Registratie: November 2000
  • Laatst online: 16:08

Arjan A

Cenosillicafoob

code:
1
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

veranderen in
code:
1
$headers .= "content-type: text/html\ncharset=iso-8859-1\r\n";

Nergens ";" gebruiken maar "\n" in de headers.

Canon EOS | DJI M2P
Fotoblog · Mijn werk aan jouw muur


  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
code:
1
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

zo staat het op php.net, maar ik heb het geprobeerd, werkt nog steeds niet...

2 swim or not 2 swim, that's the question


  • aqua_man
  • Registratie: Januari 2002
  • Laatst online: 26-07-2023

aqua_man

one life, live it!

Topicstarter
heb de \r weggehaald bij de headers en de ; toch vervangen, hij doet het nu wel :)

2 swim or not 2 swim, that's the question