Can anyone help me with code to send emails to the email ids retrieved from the database. this is to send birthday mails to my clients
[php]<?php
// user settings.
$to = ‘’; // email address of recipient.
$subject = ‘’; // subject.
$message = ‘’; // message
$from = ‘’; // from.
/**********************************/
// set the headers.
$headers = ‘From:’ . $from . “\r\n”;
$headers .= “Content-type:text/html\r\n”;
// send the mail.
mail($to, $subject, $message, $headers);
?>[/php]
if you’re sending to more than one recipient, you will need to use a loop (for/foreach/while)
Cheers,
Red.