News:

The "Support Requests" forum is now viewable by guests.

Main Menu

mail(); not going tru hotmail not even in spam folder why ?

Started by jonano, May 06, 2007, 04:03:40 AM

Previous topic - Next topic

jonano

here is my code, let me know what you think about it, but when I email to an hotmail account I dont receive the message, any hint why ? I receive the thanks message in my gmail account however, but not the your received message on the hotmail account:

<html><head><title>User Comments</title></head>

<?php session_start(); ?>

<?php

include ("mysql.php");

if(isset($_SESSION['user'])) {

$userc = mysql_real_escape_string($_GET['userc']);

$sqlupc = "INSERT INTO user_comments (user, userfrom, comment) VALUES ('$userc', '$user', '$comment')";

$sqlemailc = "SELECT email FROM tbl_auth_user WHERE user_id = '$userc'";

$result = mysql_query($sqlemailc);

while ($line = mysql_fetch_assoc($result)) {$email = $line["email"];}

if ($user == $userc) {}

else {

mail("$email", "You received a message on AVAKL from $user", "$userc, You received a message from $user\n\n You can take a look to your comments page: http://{$_SERVER['SERVER_NAME']}/usercomments.php?userc=$userc", "From: $emailu", "Reply-To: $emailu");

}

$sqlemailcu = "SELECT email FROM tbl_auth_user WHERE user_id = '$user'";

$resultu = mysql_query($sqlemailcu);

while ($lineu = mysql_fetch_assoc($resultu)) {$emailu = $lineu["email"];}

if ($user == $userc) {}

else {

mail("$emailu", "Thanks", "$user, message sent to $userc\n\n You can take a look to the comments page:

http://{$_SERVER['SERVER_NAME']}/usercomments.php?userc=$userc", "From: $email", "Reply-To: $email");

}

if(isset($_POST['comment'])) {mysql_query($sqlupc);}

$comment = mysql_real_escape_string($_POST['comment']);

header('Location: usercomments.php?userc='.$userc);
      exit;

}

if(!isset($_SESSION['user'])) {

include "login.php";
  echo "<center>You need to log in or <a href=\"signup.php\">register</a> to access our site. You are currently not.</center>";
exit;
}

?>

admin

Please create a test script that just includes

<?php
mail
("youraddress@hotmail.com""Hotmail Test Message""This is a test message for hotmail");
?>


If this works, there is a problem with your code.

Also, session_start cannot be set after output has been sent to the browser in most cases.  The session_start line must be FIRST, otherwise the session cannot be started.  Since you are checking for the existence of a session variable, your script will not process the query.

This means you MUST put <?php session_start();?> BEFORE <html><head><title>.....

If this is not the issue (i.e. the test using just the mail function fails) then hotmail is most likely blocking our mail or is having delivery problems at this time.

Thank you,
FreePgs.com Admin

admin

The server is listed on the CBL again.  We have requested removal.  Mail should start flowing to providers within the next 1 to 2 hours.

(There is still a user that is sending to a spam-trap address, causing us to be listed automatically every time they send their newsletter)

Thank you,
FreePgs.com Admin