Hi all,
Why won't the below code send an email?
I always get the message: Error.
What code should I use to get the php error messages such as warning: mail()...
foreach ($email as $key => $value)
{
$value .= '@mysite.com';
echo $key .'=>'. $value.'<br />';
// send mail
$send = mail($value, $subject, $content, $headers);
}
if ($send)
{
echo '<p>Email sent</p>';
}
else echo 'Error.';