Mail failure ?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Mail failure ?
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Hi!
Everytime some of my users click "lost password", the password mail
gets rejected by the mailserver and passed on to my admin mail account, cause
there's no recipient address?
This is what it says:
"A message that you sent contained no recipient addresses, and therefore
no
delivery could be attempted."
(Under this the actual password mail)

Obviously every user got an e-mail adress in the database(i've checked,there all there).
How can this be possible?
What do i do to remedy this problem?
Many thanks if you reply!
Dobbelina icon_biggrin.gif



Back to top Reply with quote
#2   re: Mail failure ?
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
In the index.php file in the modules/Your_Account directory, find the following code:

$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
    $result = $db->sql_query($sql);
    if(!$result) {
    include("header.php");


and change that to:

$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
    $result = $db->sql_query($sql);
//    if(!$result) {                      // Removed Line
    $user_count = sql_num_rows($result);  // Added New Lines
    if($user_count==0) {                  // Added New Lines
   include("header.php");




Back to top Reply with quote
#3   re: Mail failure ?
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Thanks,i'll try it icon_biggrin.gif
I'm wondering,there are two instances of this code in index.php,should i
change both?
And also,is this how it should look you mean ?
From this:
$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
    $result = $db->sql_query($sql);
    if(!$result) {
        include("header.php");

to this:
$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
    $result = $db->sql_query($sql);
   $user_count = sql_num_rows($result); 
    if($user_count==0) {                 
   include("header.php");



Back to top Reply with quote
#4   re: Mail failure ?
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
yes that is the way it should look without the comments



Back to top Reply with quote
#5   re: Mail failure ?
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Thanks a million,it works beatifully ! icon_biggrin.gif
I got no more of those messages.
Is this a bug or is it only my server that's having a bad day?
(I'm using v7.4 patched)
Dobbelina icon_biggrin.gif



Back to top Reply with quote
#6   re: Mail failure ?
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
yep, seems to be a bug



Back to top Reply with quote
#7   re: Mail failure ?
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Ok,that's good to know,i hope it gets fixed in new releases.
Many thanks for your help again ! icon_biggrin.gif



Back to top Reply with quote
#8   re: Mail failure ?
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
np



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum