| Anonymous | Login | Signup for a new account | 21-11-09 01:59 GMT |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0007903 | [phplist] Subscribe Process | feature | always | 18-09-06 15:54 | 18-02-08 14:19 | |||||||
| Reporter | foxpower | View Status | public | |||||||||
| Assigned To | ||||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | new | Product Version | 2.10.2 | |||||||||
| 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 |
||||||
|
||||||
| There are no notes attached to this issue. |
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |