Zonder voorbeeld van je code, lastig te beantwoorden.
Link gekopieerd
Ik denk dat je geen HTML-headers gebruikt in je mail-functie:
$headers.= 'MIME-Version: 1.0' . "\r\n";
$headers.= ('Content-type: text/html; charset=iso-8859-1' . "\r\n";
Link gekopieerd
Excuus, hierbij de code:
<?php
// multiple recipients
$to = '
[email protected] ' . ', '; // note the comma
$to .= '
[email protected] ';
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
//$headers .= 'To: Mary <
[email protected] >, Kelly <
[email protected] >' . "\r\n";
//$headers .= 'From: Birthday Reminder <
[email protected] >' . "\r\n";
//$headers .= 'Cc:
[email protected] ' . "\r\n";
//$headers .= 'Bcc:
[email protected] ' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
Link gekopieerd
J
Jan de Laet
26-09-2014 11:14
gewijzigd op 26-09-2014 11:15
Ik heb een vergelijkbare situatie en heb dit in de message staan:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>...</title>
</head>
..
En dan misschien voor jou een andere charset waarde.
Link gekopieerd
Helaas,
Krijg het volgende als mail binnen:
Content-type: text/html; charset=iso-8859-1
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Birthday Reminders for August</title> </head> <body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
Link gekopieerd
?
Onbekende gebruiker
26-09-2014 11:29
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
Hier vandaan
Link gekopieerd
De enige verschillen tussen wat jij doet en wat ik doe zijn:
// message
$message = '<html>
...
en ik heb in de $headers wel de From staan.
Link gekopieerd
Probleem gevonden.
<?php
// multiple recipients
$to = '
[email protected] ' . ', '; // note the comma
$to .= '
[email protected] ';
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
//$headers .= 'To: Mary <
[email protected] >, Kelly <
[email protected] >' . "\r\n";
//$headers .= 'From: Birthday Reminder <
[email protected] >' . "\r\n";
//$headers .= 'Cc:
[email protected] ' . "\r\n";
//$headers .= 'Bcc:
[email protected] ' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
Link gekopieerd
even een andere vraag als vervolg op het bovenstaande.
Ik zou graag een jpg-file in de html-body toevoegen.
Hoe kan ik dit doen?
Link gekopieerd