I think this will work.
<?php
$get_mail_address = mysql_query("SELECT mailing_list FROM table_name WHERE post_id = '$post_id'");
$row_mail_addresses = mysql_fetch_assoc($get_mail_address);
$number_rows = mysql_num_rows($get_mail_address);
if($number_rows > 0) {
$mail_address = explode('|', $row_mail_addresses['mailing_list']);
foreach($mail_address as $address) {
$subject = " Reply to a posting";
$message = "
A reply has been posted to a posting you are tracking.
Have a look here : [url of reply]
No need to reply to this email.
Thanks!
";
$from = "myemail@site.com";
$headers = "From: $from";
mail($address, $subject, $message, $headers);
}
}
?>