phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017330phplist applicationEmailpublic26-08-14 15:3008-10-14 12:00
ReporterFineCutBodies 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.0.7 
Target VersionFixed in Version3.0.9 
Summary0017330: Welcome to the list messages aren't sent
DescriptionI didn't understand why my welcome messages aren't arriving only occasionally while testing the functionality of my site with 2-3 email addresses, subscribing and deleting them afterwards...

When i was trying to debug where they are lost, I found that confirmation emails won't be sent out until "$_SESSION['subscriberConfirmed']" is set. It's set when the user clicks confirmation link in his browser:
- "index.php" >> function confirmPage($id)
there is: "$_SESSION['subscriberConfirmed'] = time();"

When after a confirmation of a subscription, I try to subscribe another email of mine and I do it not by subscription page, but sending subscription data by POST the "index.php" will call "subscribelib2.php" what returns with 2 (no need to show subscribe page) so it won't call the function SubscribePage($id) what would unset "$_SESSION['subscriberConfirmed']", so it stays set and when i click the new subscription email's confirmation link, it won't send out the "welcome message":

Index.php - line 257:
case "subscribe":
  $success = require 'admin/subscribelib2.php';
  if ($success != 2) {
     print SubscribePage($id);
  }
  break;

- "index.php" >> function subscribePage($id)
there is: "unset($_SESSION['subscriberConfirmed']);"


------------------------

Sorry if it's a false alarm, i'm pretty new to PHP and PHPList so maybe i'm wrong, but my patch just solved my problem :)
TagsNo tags attached.
Attached Files

- Relationships
related to 0017411resolvedmichiel phplist application allow duplicate sending of welcome email 

-  Notes
(0054702)
michiel (manager)
26-08-14 20:11

The idea of flagging in the session that the welcome email has been sent is to avoid sending it twice on for example a page-reload.

I'm not entirely sure what situation you are in to not want that, but it seems like a non-common situation (eg you adding multiple addresses). In general a subscriber will only do this once, in which case it's fine as it is.

Unless you come with a compelling argument to change that behaviour, I'd be inclined to not action this issue.
(0054703)
FineCutBodies (reporter)
26-08-14 20:39
edited on: 26-08-14 21:58

Unless you want to handle these two subscription types differently, it's ok, but I have a feeling they both should clear the flag, so seems an unintended mistake, what could be easily corrected:

1, display subscribe form because no data was provided in the address bar
2, all data was POST-ed, subscription was made so the return value for $success==2 (no need to show subscribe form)

In the second version "SubscribePage($id)" won't be called, so the flag won't be deleted (unset is in that function)....

------------
Index.php - line 257:
case "subscribe":
  $success = require 'admin/subscribelib2.php';
  if ($success != 2) {
     print SubscribePage($id);
  }
  break;

(0055331)
michiel (manager)
08-10-14 12:00

thanks that was very helpful. Keep them coming FineCutBodies :-)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker