| Anonymous | Login | Signup for a new account | 02-09-10 21:46 GMT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0007903 | phplist | Subscribe Process | public | 18-09-06 15:54 | 18-02-08 14:19 | ||||||
| Reporter | foxpower | ||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | new | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 2.10.2 | ||||||||||
| Target Version | 2.11.X | Fixed in Version | |||||||||
| Summary | 0007903: Solution: new subscriber gets last list email automatically | ||||||||||
| Description | Hi, here's a quick & dirty solution for the problem / feature request 'New subscriber automatically sent last list email'. Works great with one list, for more lists you have to rework the query (phplist 2.10.2): I use only one list, so I assume that the actual newsletter to send has the highest id in the table - ah, and it can only be a record, that has a embargo date in the past. If you use more lists in your phplist installation, then you have to refine the sql query. OK, let's start (we're working on the file /lists/index.php): Search for line 501 ($res .= $html;) and insert after that the following six lines: Code: $job = Sql_Query("SELECT max(id) FROM $tables[message] WHERE embargo <= now()"); $nldata = Sql_Fetch_Array($job); $result = Sql_Query("UPDATE $tables[message] SET status = \"submitted\" WHERE id = $nldata[0]"); $success = Sql_Affected_Rows(); if ($success) $res .= "You will revcieve in a few minutes a copy of our latest newsletter. "; That's all. Every time a new user confirms his newsletter activation, the latest valid newsletter record is set to 'resend' (table phplist_message, field status = submitted). The next time when your cron job processes the queue the latest newsletter will be sent out to new users. Greets, Foxpower$ | ||||||||||
| Additional Information | Posted already in the forum: http://forums.phplist.com/viewtopic.php?p=20220#20220 [^] | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Relationships |
||||||
|
||||||
| Copyright © 2000 - 2010 MantisBT Group |