$array = array(
'one',
'two',
'three',
'four',
'five'
);
$_POST['variable'] = 'this is an index in the POST array';
$to = 'John Q. Example <john@example.com>';
$from = 'from: Marly <marly@marly.net>';
$subject = 'this is a test email with arrays and POST variables';
$message = 'below is an array:' . "\n\n" .
implode("\n", $array) . "\n\n" .
'and here is a POST variable:' . "\n\n" .
$_POST['variable'] . "\n\n" .
'thank you';
$mail_sent = @mail($to, $subject, $message, $from);
if ($mail_sent) {echo 'mail successfully sent';}
else {echo 'error sending mail';}