After successfully sending a newsletter to a list of subscribers (once) today the newsletter did not get sent. Test messages still get sent.

A couple of questions:

Why do I get "Newsletter pending" when I submit a newsletter? it appears this message should only apply for cron messages yet I have not checked to use cron.

Where do the Send mail options get stored? There are only 4 simplenews_* tables and none of them appear to store the cron option.

Comments

Simon Georges’s picture

Category: bug » support

I suppose the newsletter is "pending" until every last email is sent. Then the status should change.

Simplenews global configuration is a variable, and therefore is in the {variable} table.

Patricia_W’s picture

That may be the case for cron, but the message does not get sent. I'd still like to know where the setting not to use cron is stored.

This is what I think is the relevant code:

if (variable_get('simplenews_use_cron', TRUE) == FALSE) { // this should be the case for messages sent directly (I think)
      simplenews_mail_spool($node_data['nid'], $node_data['vid'], 999999);
      drupal_set_message(t('Newsletter sent.'));
      simplenews_clear_spool();
    }
    else { // this should only apply to newsletters being sent via cron which should not be the case  
      drupal_set_message(t('Newsletter pending.'));
    }
miro_dietiker’s picture

Status: Active » Fixed

Simon Georges already stated the clean answer to your question:
"Simplenews global configuration is a variable, and therefore is in the {variable} table."

The only reason why you receive a "Newsletter pending" is because your system broke (e.g. due to maximum execution time). Simplenews tries to fix this case with hook_cron and complete the incomplete sending task and switches from pending to complete.

We cannot change anything here, this is the only way to have a clean system for all cases.
In this case i strongly recommend you to use cron for ALL cases, since you reached your system limits.

Patricia_W’s picture

My apologies ... I did not read Simon's reply carefully enough. What is the name of the variable? I've looked in the variable table and can't see anything related to simplenews. The only one that appears relevant is site_mail which has a value of 's:20:"pwarwick@waremail.ca"' and cron_last 'i:1322833990;'

It is possible we reached a system limit but we are only sending this newsletter to 43 subscriptions and it is a very small newsletter with one image which is linked to an external file.

The problem with cron is that it delays sending the newsletter unless it runs frequently and we want this particular newsletter to be sent immediately. The other problem is that the host for this site does not permit us to schedule cron so it has to be run manually.

Is there any further diagnostic work I can do to confirm that it has hit a system limit?

Patricia_W’s picture

I should have mentioned that we were able to send the newsletter to the same 43 subscribers so whatever limit we are hitting is intermittent.

Patricia_W’s picture

Priority: Major » Normal
Status: Fixed » Active

If it is a system limit a why was the table simplenews_mail_spool empty? is this table just used by cron?

Is it not possible to generate an error message if this happens?

I can't use poormanscron because apparently it will duplicate messages. I can't use cron because of web host limits. I am prepared to change hosts (Lampsite wasn't my choice in the first place) but I would hate to do so and still get the same problem.

While I was composing this comment, the person who was posting the newsletter managed to post it successfully. I'm not confident that it will not fail again but I hope so.

miro_dietiker’s picture

Issue summary: View changes
Status: Active » Fixed

Closing old support requests.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.