NMS sending duplicate emails?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

NMS sending duplicate emails?

Post by turniphead »

I set up a CMS site with NMS for someone. It is running 1.5.4 on a patched, up-to-date LAMP platform - I'm waiting for authorization to upgrade it to the latest. The site owner is complaining that the newsletter is sending out duplicate emails (up to 11 duplicate mails to one recipient).

As luck would have it, I signed up to the CMSMS newsletter recently. I got the email confirmation request, and then the same confirmation email came 3 times. It does seem like the NMS system is sending duplicate mails under some conditions. Is this a known issue?
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: NMS sending duplicate emails?

Post by tyman00 »

I've never seen this happen and I've been running NMS for a couple years. One of them sends out emails to hundreds of recipients.

Are you using the same server for sending the email as the site is on? My guess is a goofy setting in the email settings.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

Re: NMS sending duplicate emails?

Post by turniphead »

I'm debugging at the moment. The end user has complained, and I'm trying to recreate. The site uses the same shared hosting package from a reputable supplier, that I recommend to most folks.

I definitely got 3 identical subscription confirmation emails from the official CMSMS newsletter system though - and that is running NMS. This leads me to believe that there is a problem.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: NMS sending duplicate emails?

Post by tyman00 »

It's tough to say. Personally, I've never seen it happen on the numerous sites I have it running on and the hundreds of emails that are sent out.

Maybe just check with the host to see if they made any configuration changes to their server. Maybe this is an inadvertent side effect to a change they made.

Was it working before, as in only sending out single emails?
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

Re: NMS sending duplicate emails?

Post by turniphead »

Thanks Tyman00.

Did you read the bit about the official cmsmadesimple.org website's NMS module also seeming to have a similar problem? I really doubt that the CMSMS website host and my site host both have similar misconfiguration issues.

On the other hand, I know the module is running reliably on may websites, and I can't find anybody else reporting the problem in the forums.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: NMS sending duplicate emails?

Post by tyman00 »

I didn't see that part about the official site having duplicates. I will take a look into it. I setup the latest templates for the official newsletters and didn't have any duplicate issues that I recall. If I find anything of interest I will definitely let you know!
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Somebody_1
Forum Members
Forum Members
Posts: 26
Joined: Tue Oct 20, 2009 10:52 am

Re: NMS sending duplicate emails?

Post by Somebody_1 »

I have about 15 clients using NMS, I had one client report the same thing email sent 13 times. It's weird as they are all running on the same server.

I'm thinking there could be an issue in the batch creation/sending. As not all receipts receive the email X times it's only a selected few. I have not been able to reproduce it. I'm wondering if bad email data would cause it. Might be worth export the data and checking it out.

I have one client that uses it to send to over 40,000 people  and they have not seen the issue and I hope they dont.
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

Re: NMS sending duplicate emails?

Post by turniphead »

Thanks for the response Somebody_1

In a way, I'm relieved to know that somebody else is seeing this. It is a testament to the software that it is servicing crowds of 40,000 without issue. I'm wondering if there is a common denominator for the 3 lists that have exhibited the issue - the official NMS list, your list and my list.

I can tell  you that my problem list had data imported from CSV, which was easy to scan - I didn't see any obvious problems with illegal chars, etc. I can also tell you that I have failed to recreate it on my test system which is full patched. However, I only have a handful of email addresses with which to test on my test system. I've also tested with a small list on the "bad" client system, and there were no problems. I'm wondering if the problem may be triggered when the system moves from one batch of 50 to the next.

I've never looked at the code, but I would imagine the actual email sending process is covered by a small amount of code. I'm snowed under today, but I'll try to take a look over the weekend. If I had to speculate, it sounds like an array index isn't getting incremented in certain circumstances.
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

Re: NMS sending duplicate emails?

Post by turniphead »

I didn't see anything obviously wrong in a quick scan of the code although this in the action.process_queue.php file didn't inspire confidence  ;D

Code: Select all

// ABANDON HOPE ALL YEE WHO ENTER HERE
// this code is in serious need of a rewrite
The basic email loop seems to be sound. I'm wondering if the temporary table that is the source of the recipients might be the source of the duplicates? Here is the query that is used to populate it. I don't have access to the live site database to test it right now.

Code: Select all

    $q = "SELECT DISTINCT jobid,email,username,C.uniqueid,messageid FROM ".
            NMS_LISTUSER_TABLE." A left join ".
            NMS_JOB_PARTS_TABLE." B on A.listid = B.listid left join ".
            NMS_USERS_TABLE." C on A.userid = C.userid 
	  WHERE C.disabled = 0 AND C.confirmed = 1 AND jobid = ? 
          ORDER BY messageid";
Somebody_1
Forum Members
Forum Members
Posts: 26
Joined: Tue Oct 20, 2009 10:52 am

Re: NMS sending duplicate emails?

Post by Somebody_1 »

The client of mine imported via CSV as well. I know in the past they have made a mess of it and I had to wipe the tables.
User avatar
RJK
Forum Members
Forum Members
Posts: 59
Joined: Mon Nov 16, 2009 8:58 pm

Re: NMS sending duplicate emails?

Post by RJK »

I'm just in the process of implementing NMS and have also experienced this problem. As it's early days for me, the only email address' I've used are my own. For me:
  • my hotmail account has never received any subscription confirmation request (I've done it three times now) although upon registering on the site it appears all is well. I can also see the address appear within NMS.
  • to two of my own domains, the response seems variable in that: twice I've received 3 confirmation emails to subscribed addresses and 3 times I've received nothing. On a positive note half a dozen times or so everything has come through fine.
I have't gotten to test mailers as yet, however, I plan to spend some time on NMS today hence will see what it brings. Certainly a little nervous at the moment on this duplication issue though.
turniphead
Forum Members
Forum Members
Posts: 40
Joined: Thu Jul 31, 2008 12:16 pm

Re: NMS sending duplicate emails?

Post by turniphead »

Thanks RJK. Please do keep us posted. We've now had 4 reports of duplicate emails (including CMSMS's own newsletter system), so it does look like a bug is present.
User avatar
RJK
Forum Members
Forum Members
Posts: 59
Joined: Mon Nov 16, 2009 8:58 pm

Re: NMS sending duplicate emails?

Post by RJK »

Well I've well and truly tested it now and for some unknown reason (which I'm not going to question) I am no longer getting duplicate emails. It happened 2 or 3 times at the start but nothing since. The hotmail issue was my overzealous spam folder.
darusk
New Member
New Member
Posts: 2
Joined: Sat Jan 30, 2010 9:55 am

Re: NMS sending duplicate emails?

Post by darusk »

I've encountered sending double emails, in my case, changing mail sending method from mail to smtp did the trick.
Post Reply

Return to “Modules/Add-Ons”