Project:Simplenews
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Is it possible in a future release to integrate the great simplenews module with the new scheduled_action (like sched_act) module?
I suppose (hope) that this isn't too complex (for whom mantain and know well simplenews and drupal code) but it finally offers a clean and efficiently method to obtain the necessary scheduled simplenews! (at the moment is only possible to schedule publish/unplush/sticky/unsticy etc a simplenews node, but not schedule sending).
However thanks a lot for this great module,
Saxx

Comments

#1

Version:5.x-1.1» 7.x-1.x-dev

Thanks for the tip! The ability to schedule the submission of newsletters is on my wish list. I don't expect to implement this in a 5.x version will certainly have a look at it for 6.x developments.

#2

#219544: Actions to do scheduled sending might provide a solution

#3

I'm using Drupal 6.11 with Simplenews 6.x-1.0-rc6.

Maybe it's not the best solution, but to add scheduled sending (sending the letter only once), I use the Scheduler module to publish the newsletter-node at a specific date/time.

To send only published newsletters when the cron runs, I added one if-statement to simplenews.module:

<?php
function simplenews_get_spool($status, $nid = NULL, $vid = NULL, $limit = 999999) {
 
$messages = array();

 
$result = db_query_range("SELECT * FROM {simplenews_mail_spool} s WHERE s.status = %d ORDER BY s.timestamp ASC", $status, 0, $limit);
  while (
$data = db_fetch_array($result)) {
   
$node = node_load($data['nid']);      //ADDED!
   
if ($node->status) {                  //ADDED!
       
$message = array();
        foreach (
$data as $key => $value) {
         
$message[$key] = $value;
        }
       
$messages[$data['msid']] = $message;
    }                                    
//ADDED!
 
}
  return
$messages;
}
?>

#4

Status:active» closed (duplicate)

Duplicate of #497108: Send newsletter when node is published.

nobody click here