[Solved] Code fix to display unprocessed bounces

Solutions for other advanced phplisters

[Solved] Code fix to display unprocessed bounces

Postby headalien » 2:30am, Mon 19 Oct, 2009

In version 2.10.10 unprocessed bounces were not showing up as they should in admin/?page=bounces
(Number of bounces is shown but actual bounces were not shown)
Edited admin/bounces.php line 45:

From:
Code: Select all
$where = ' where status != "unidentified bounce" ';


To: ( change != to = )
Code: Select all
$where = ' where status = "unidentified bounce" ';


and bounces are now listed with controls to view and process individual bounces

Note: advanced bounce handling must be enabled in the config file.
headalien
phpList newbie
 
Posts: 4
Joined: 2:03am, Mon 19 Oct, 2009

Re: [Solved] Code fix to display unprocessed bounces

Postby headalien » 9:02pm, Fri 04 Dec, 2009

Slight revision...as I have used the program more I realized that I only had unprocessed bounces so changing this allowed me to see them....once bounces are processed you will need to switch it back to see them.

For my purposes I wanted to see all bounces whether they are processed or not.....to accomplish this I changed

Code: Select all
$where = ' where status != "unidentified bounce" ';


to

Code: Select all
$where = ' ';


(or you can comment out the line entirely)


I also wanted to see the comments so I added which just shortened the bouncecount listing
$comment = $bounce["comment"];
Code: Select all
  if(stristr($comment, 'bouncecount increased')){
     $comment = 'bounce+';
  }


and modified

Code: Select all
printf( "<tr><td>[ <a href=\"javascript:deleteRec('%s');\">%s</a> |
   %s ] </td><td>%s</td><td>%s</td><td>%s (%s)</td></tr>\n",
   PageURL2("bounces",$GLOBALS['I18N']->get('delete'),"s=$s&delete=".$bounce["id"]),
   $GLOBALS['I18N']->get('delete'),
   PageLink2("bounce",$GLOBALS['I18N']->get('show'),"s=$s&id=".$bounce["id"]),
   $messageid,
   $userid,
   $bounce["date"],
   $comment
   );


by adding (%f) within the last <td></a>
and adding , $comment to the end of the list.

Finally I added comment, to the Order By clause in the following code:
Code: Select all
 $result = Sql_Query(sprintf('select * from %s %s order by comment, date desc',$tables["bounce"],$where));



Now my bounce list shows all bounces whether processed or not and what action was taken and they are sorted by the action....

Mileage may vary but this made bounce handling a lot easier for us.
headalien
phpList newbie
 
Posts: 4
Joined: 2:03am, Mon 19 Oct, 2009

Re: [Solved] Code fix to display unprocessed bounces

Postby birkosan » 2:59pm, Wed 03 Mar, 2010

Thanks ... very useful !

Levi
birkosan
phpLister
 
Posts: 8
Joined: 2:50pm, Wed 03 Mar, 2010

Re: [Solved] Code fix to display unprocessed bounces

Postby fatimadev » 2:37pm, Thu 17 Jan, 2013

Hello
headalien wrote:
Note: advanced bounce handling must be enabled in the config file.
I want to know how or what I'm going to change variable

an ohter question , why those mail display unidentified , i want to list the corrects mails??

please i need the inswers
fatimadev
PL Nut
 
Posts: 34
Joined: 11:59am, Wed 03 Oct, 2012


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest