Mail () Problems to hotmail and yahoo
Posted: Mon Jul 27, 2009 12:23 am
This is what i got so far.
Now i can recieve mail from gmail accounts, but i tested sending to my hotmail and yahoo mails without any success, i also checked if there are in the junk or spam section, but there are not. It seems the mail didn't arrive to the destination. Does anyone know why?
Code: Select all
<? function mailer ()
{
global $website_email;
if ((isset($_SESSION['Username'])) && (($_SESSION['Mode'] == 'admin') || ($_SESSION['Id'] == $r['postedby'])))
{
$adminemail = $website_email;
$from = "From: \"Administrador de Craken\" <$adminemail>";
$id = $_REQUEST['id'];
msqlcon();
$query = mysql_query("SELECT * FROM " .s('prefix'). "articles WHERE id='$id'");
$r = mysql_fetch_array($query);
$subject = $r['title'];
$upperbody = "This is a original copy of the post";
$mainbody = $r['text'];
$signature = "Admin";
// echo $subject;
// echo $mainbody;
$query = "SELECT * FROM " .s('prefix'). "users WHERE recievemail = 'YES' ORDER BY id DESC";
$result = mysql_query($query) or die("SQL Error");
$emails = array();
while($e = mysql_fetch_array($result))
{
$emails[] = $e['email'];
}
$to_mail = implode(",", $emails);
// echo implode(",", $emails);
If(mail($to_mail,$subject,$upperbody.$mainbody.$signature,$from))
{
exit("Mail sent <b>ok</b>.");
}
else
{
exit("Sending mail <b>failed</b>.");
}
}?>