01.
<?php
02.
03.
$to
=
'aidan@example.com'
.
', '
;
04.
$to
.=
'wez@example.com'
;
05.
06.
07.
$subject
=
'Birthday Reminders for August'
;
08.
09.
10.
$message
= '
11.
<html>
12.
<head>
13.
<title>Birthday Reminders
for
August</title>
14.
</head>
15.
<body>
16.
<p>Here are the birthdays upcoming in August!</p>
17.
<table>
18.
<tr>
19.
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
20.
</tr>
21.
<tr>
22.
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
23.
</tr>
24.
<tr>
25.
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
26.
</tr>
27.
</table>
28.
</body>
29.
</html>
30.
';
31.
32.
33.
$headers
=
'MIME-Version: 1.0'
.
"\r\n"
;
34.
$headers
.=
'Content-type: text/html; charset=iso-8859-1'
.
"\r\n"
;
35.
36.
37.
$headers
.=
'To: Mary <mary@example.com>, Kelly <kelly@example.com>'
.
"\r\n"
;
38.
$headers
.=
'From: Birthday Reminder <birthday@example.com>'
.
"\r\n"
;
39.
$headers
.=
'Cc: birthdayarchive@example.com'
.
"\r\n"
;
40.
$headers
.=
'Bcc: birthdaycheck@example.com'
.
"\r\n"
;
41.
42.
43.
mail(
$to
,
$subject
,
$message
,
$headers
);
44.
?>