Author Topic: Email notification of bounced users broken in 1.77B  (Read 3530 times)

chufford

  • Posts: 34
    • View Profile
Email notification of bounced users broken in 1.77B
« on: July 02, 2004, 06:37:54 pm »
It appears that the email notification of a bounced user no longer works if you use a threshhold and if you have bounced users removed from the database. In 1.77b the user is removed from the database before the notification email is sent which disables the ability to send the email because the user is no longer in the database.

This happens toward the bottom of function bounce(). mysql_query("delete... is called before sendnotif().

Here is the fix that worked for me:
Code: [Select]
    if($calc <= $days){
      $lrow = mysql_query("select listopts from $ltable where listnum = '$list'");
      list($listopts)=mysql_fetch_row($lrow);
      $listopts = explode(';',$listopts);
      $narr = getnotifs($list);
      if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);
      if($listopts[1]==1){
       mysql_query("update $utable set cnf = '3' where id = '$id'");
      } else {
       mysql_query("delete from $utable where id = '$id'");
      }
     } else {
Chris Hufford

davenet

  • Posts: 13
    • View Profile
Email notification of bounced users broken in 1.77B
« Reply #1 on: December 01, 2004, 11:31:37 am »
Excellent fix. I hope Dean incorporates this right away. I just was notified by a client who noticed they stopped getting notices of deleted email addresses. I'll implement this and see what happens.

David

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Email notification of bounced users broken in 1.77B
« Reply #2 on: December 01, 2004, 08:31:31 pm »
This could explain why some people are experiencing "vanishing" emails.  Thanks, guys.  This will definitely be fixed.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
removal of code...
« Reply #3 on: December 08, 2004, 07:52:34 am »
Hi,

Could you please be a little more specific, I see the code in admin.php, are you removing this else:
Code: [Select]
    } else {
      $narr = getnotifs($list);
      if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);


So that the end code looks like this:
Code: [Select]
    if($calc <= $days){
      $lrow = mysql_query("select listopts from $ltable where listnum = '$list'");
      list($listopts)=mysql_fetch_row($lrow);
      $listopts = explode(';',$listopts);
      $narr = getnotifs($list);
      if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);
      if($listopts[1]==1){
       mysql_query("update $utable set cnf = '3' where id = '$id'");
      } else {
       mysql_query("delete from $utable where id = '$id'");
      }
     } else {
      $n1 = $bounces[0] . ';' . $bounces[2];
      while(list($key,$val)=each($bounces)){
       if($key > 2 ){
        $n1 .= ';' . $bounces[$key];
       }
      }
      $n1 .= ';' . $today;


Please let me know if that looks right?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

chufford

  • Posts: 34
    • View Profile
Email notification of bounced users broken in 1.77B
« Reply #4 on: December 08, 2004, 08:49:10 am »
Yes, that looks exactly like the code I have now. The change is to get and send the bounce notification before the record gets deleted. It is basically a reordering of code that was already there.
Chris Hufford

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
bad code still in admin.php...
« Reply #5 on: December 16, 2004, 07:00:12 am »
Hi,

Ok, so I downloaded the latest version and went to look at the admin.php code just to make sure I had it right.  The old code is still in there???  

The code:
Code: [Select]
     $narr = getnotifs($list);
      if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);


still occurs AFTER the update/delete from table?   Is there something I'm missing - or did you forget to update this DW?   I know you said in another thread that the newest code was posted and corrected, but it doesn't look like it to me...  I downloaded 1.77b, unless there is somewhere newer to get the code?  

Also, I see that the changed code for signup-list1 is updated to grab the first name correctly so this must be correct code - how about a Version Code system, or some way to let us know of all the changes made - I've added my own modifications to the code and want to make the updates manually so I don't lose what I have.

There is another inconsistency I see - have a look at this:
Code: [Select]

if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);


and this:
Code: [Select]

      if($listopts[1]==1){


Note how one comparison is looking for =='1', while the other is ==1 is this correct DW, or should both of these be one way, or the other, or is this related to the fact that you do an explode to get one of the options, and a getnotifs($list) to get the other?

Also, I don't like to keep asking this but WHEN are we going to see the update and the new version DW?

Let me know, as I want to make sure I have this right - messing with the Bounce Code needs to be correct.
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Email notification of bounced users broken in 1.77B
« Reply #6 on: December 16, 2004, 08:10:34 am »
I have simply replaced the existing v1.77b ZIP with a new one.

This code WAS incorrect (I just downloaded and viewed the file).

The fix needed to be applied in TWO places but I only did it in one.  The file available NOW works.

I see the mistake with the quotes - it shouldn't matter but it is an inconsistency.

The version will be shown more clearly in the next update.  Currently, the program only changes version numbers when a database update must take place.

Please be patient.  I'm working on the update almost every day.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
where's the other code change?
« Reply #7 on: December 16, 2004, 10:08:50 am »
Hi Dean,

Quote from: "DW"
The fix needed to be applied in TWO places but I only did it in one.  The file available NOW works.


Ok, where is the second place the code changes?  I'll have to locate that and make the change as well....   please let me know there's many lines of code here, I don't see any more of the sendnotif calls?
Code: [Select]

      $narr = getnotifs($list);
      if($narr[3]=='1') sendnotif('rem_bounce',$id,'',$msg);


Quote from: "DW"
Please be patient.  I'm working on the update almost every day.


Great, just looking forward to it!!!  With all the changes talked about it should really move my sending forward  :)  any idea at all on how much longer?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)