Newsletters are not sent to the subscribers. They are moved to the "Sent issues" column but their status is "pending" forever. I thought the problem was in the number of subscribers. I created a new newsletter which has only one subscriber (me) and still the newsletter was not delivered and has the "pending" icon. However, when I select to "Send test newsletter", the newsletter is sent to the test address just fine. What could be the problem? Please help!

Comments

sutharsan’s picture

With "pending" do you mean 'Currently sending by cron'?
Does simplenews use cron to send messages? What is the 'Initial send time' setting?
Is cron running?

clickdeveloper’s picture

> With "pending" do you mean 'Currently sending by cron'?

I guess so. In Home » administer » Content management >> Sent Issue tab, I see the blue icon that looks like a watch.

> Does simplenews use cron to send messages?

I guess so. Initial send time is 2 seconds. After that the cron is to handle the job. Cron seems to work fine (on each cron run I get e-mail notifications about new commends posted on the site). How can I check if simplenews has problems with cron on my site?

I don't know if this helps, but the problem occurred after I upgraded to drupal 5 and simple news 5x-1.1. Before that the module worked fine.

sutharsan’s picture

> "I see the blue icon that looks like a watch."
Yes that means messages are in the cron queue = pending

> "Initial send time is 2 seconds."
For the first messages cron is not used. You can try increasing the initial send time, but I do not expect any results from this.

A number of questions derived from the module code:
* Are the subscribed users active?
* Do you use the throttle module?
* Do you have simplenews error messages in the watchdog log?
* Do you have a custom version of the theme_simplenews_newsletter_footer() function, if so please give the code.

clickdeveloper’s picture

Yes, all the subscribed users are active. The throttle module is not enabled. The only message from the news module in the log is "sent confirmation e-mail to...". No errors are logged. I do not have a custom version of the theme_simplenews_newsletter_footer() function. I use the module as downloaded form drupal.org; no customization was made.

sutharsan’s picture

Do other functions of simplenews work correct? Can you export subscribed users?
What was the previous version of simplenews from which you updated?
Are you familiar with reading mySQL tables?
Do you know how to use the development module?
Do you have an irc account?

clickdeveloper’s picture

Other functions of simple news seem to work fine: I can export e-mail addresses, I can create and edit newsletters, send a newsletter to the test address, subscribers add their e-mails to the database and get the confirmation e-mail.

At first I used version 4.6. It worked very well. I installed version 4.7 but there was an error when trying to run the simple news update script. I do not remember the error message but I guess it did not update the database. Version 4.7 was not my target version. I did not try to send a newsletter with this version. I wanted drupal 5. So I reinstalled drupal and installed simple news 5.x-1.1 In the MySQL database, I had tables called sn_newsletters, sn_snid_tid, sn_subscriptions. Version 5.x created empty simlenews_newsletters, simplenews_snid_tid, simplenews_subscriptions. I had to move the data to the new tables. I guess something went wrong at this part. I am not a programmer and could do some stupid mistake. Is there any way to reinstall everything from scratch and import all the sent newsletters?

I can read mySQL tables. I have never seen the development module but can learn how to use it if this is required to fix the problem. I have a lot of subscribers and it is very important for me to find out what went wrong and fix it. I do not have an irc account; I use Skype. But if required, I will try and get an irc account.

sutharsan’s picture

Since you have had table conversion problems this is a candidate for the cause of the problems. You need to (re)evaluate the structure and content of the 4.6 and 5 simplenews tables. The _simplenews_send function uses all three simplenews_ tables. First focus on the simplenews_subscriptions table, s_status and a_status.

clickdeveloper’s picture

Got everything fixed. The problem was created by me. Your module is great. And thank you very much for your support.

sutharsan’s picture

Status: Active » Fixed

I'm glad you got it fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
P3t3r’s picture

So how have you solved this? I'm having the same issue in 7.x.

P3t3r’s picture

So how have you solved this? I'm having the same issue in 7.x.

P3t3r’s picture

Never mind, it was Cron not executing after mail being queued.

sohail.alee’s picture

same issue was with me, I ran cron and the pending newsletter issue get fixed.