Is anyone else having problems with the Mass Contact module? It seems to be a great solution, however the users are getting multiple emails from the form submission. Is there any way to turn this off or troubleshoot how this is happening?

Cheers,
Stew

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Andy Inman’s picture

Category: support » bug

Getting the same. Received 23 copies, possibly related to the fact that 22 batches were sent. Might try to make it send one batch only and see if that makes any difference.

Andy Inman’s picture

Just been told by one of our members that she received 43 copies of the same message (I received 23).

Stewplayer’s picture

Does it have to do with the roles? My members have roles, (ie; different membership types). Most only have one role, but the authenticated user is checked for each also. (although it is greyed out) Could this be the reason?

sharplesa’s picture

Ah yes. I've been doing a lot of debugging myself to get a handle on how Mass Contact works.

If you have the Bcc switch turned on, and you are using batches, Mass Contact actually puts *your* address on the "To" line, and then puts all your recipients in the Bcc line. Mass Contact creates a new email for each batch, so you'll get the email sent to you for every batch.

If you don't want to get all the emails, and if Bcc isn't necessary, just uncheck Bcc, and you'll only get a copy of the email if you ask for it.

But, if Bcc *is* necessary, you'll have to get the emails every time, unless you specify a dud email address in the "Your Email Address" field on the Mass Contact form.

sharplesa’s picture

Status: Active » Postponed (maintainer needs more info)

Forgot to change status. Ball's back in your court... :)

Problue Solutions’s picture

I'm having this problem too, not me receiving multiple emails...my users are, is there any solution? Mass Contact works fine apart from this but I'll have to switch to another mailout module if I cant solve this.

Problue Solutions’s picture

Status: Postponed (maintainer needs more info) » Active

I have 3 roles:

authenticated user
role A
role B

My users can be either role A OR role B, not both. But they are all authenticated user obviously.

I have a catagory for role A, and a catagory for role B, if i want to send the same email to ALL users, i send it to catagory A first, then send a seperate but identical email to catagory B.

My users are still receiving the email twice which makes no sense to me as they can only be either role A or role B, not both.

Is there possibly something else going on here thats not role related?

benthroop’s picture

I also sent out a mail that was batched today, using BCC, and at least one guy got it 30 times. Not everyone got it that many times though... I'm not even sure if anyone else did.

I'll peek at the code myself but I'm curious if it's got to do with the batching.

Does Mass email put a log anywhere of who it sent to?

oadaeh’s picture

@benthroop: Yes, Mass Contact does have logging. Go to /admin/reports/dblog and filter on the mass_contact type.

benthroop’s picture

oadeah - Unfortunately, the log entry doesn't list the users that were mailed.

So, I talked to my server guys about this, and they said this:

From what I am seeing, it appears yahoo is deferring the mail. Here is what I am seeing in the logs.

2009-03-03 18:32:56 1LeWns-00043T-2C == xxx@yahoo.com R=lookuphost T=remote_smtp defer (-18): Remote host f.mx.mail.yahoo.com [209.191.88.247] closed connection in response to end of data
2009-03-03 18:31:51 1LeWns-00043T-2C == yyy@opgrowth.com routing defer (-51): retry time not reached
2009-03-03 18:31:51 1LeWns-00043T-2C == zzz@yahoo.com routing defer (-51): retry time not reached
2009-03-03 18:31:51 1LeWns-00043T-2C == aaa@yahoo.com routing defer (-51): retry timenot reached
2009-03-03 18:31:51 1LeWns-00043T-2C == bbb@yahoo.com routing defer (-51): retry time not reached
2009-03-03 17:36:27 1LeWns-00043T-2C == ccc@yahoo.com R=lookuphost T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:: host d.mx.mail.yahoo.com [66.196.82.7]: 452 Too many recipients

I'm learning more about this, but curious if the other folks having this problem were having it specifically with yahoo users getting repeats.

Problue Solutions’s picture

I can confirm that hotmail users also get duplicates (along with it being marked as junk)

benthroop’s picture

Well, we are having issues that are unrelated to Mass Contact as well. Being on a new server, we didn't realize that our mail headers were from a host name that didn't resolve to our IP. So looking in the mail queue, each of those batch emails was sitting there, presumably attempting resends. So I'm not sure this is so much an issue of a Mass Contact bug as of either a) server configuration issues or b) drupal_mail() issues.

Thoughts anyone?

oadaeh’s picture

@benthroop: Sorry, I was thinking about the saved nodes, not the logs. I've been out of my own loop for a while and didn't remember correctly. If you save a copy of the message you send as a node, it will have all the recipients the message was sent to listed out there.

@all: As far as the multiple e-mails go, it is quite possible, due to the way Mass Contact sends them out, that people will receive multiple copies. Mass Contact goes through each selected category, one-by-one, assembles the list of recipients and sends the e-mail. So, if you are sending to 10 categories and all the users are members of all 10 categories, each user will receive the e-mail 10 times.

Also, if you add BCC as an option, the sender will receive one for every batch that gets sent out, because the sender's e-mail address also becomes the To: address. If you then further break up each sending by a number of recipients, say 10 out of a total of 100, then the sender will get additional e-mails, based on the number of groupings of each category sent.

For a little more clarity, if you send a Mass Contact message to four categories with 20, 40, 110 and 140 recipients, and you have your maximum number of recipients set to 25 (admin/build/mass_contact/settings) and the BCC option set, then the sender should get 13 copies of the message. The most any recipient should get is four.

If your recipients are getting more copies than categories being sent to, then something else is going on. Maybe there is another module installed that is intercepting the message and doing something with it. Maybe there's a stray line of code in Mass Contact that multiplies the number of recipients by three. Try sending a test message to a small sampling and saving the message as a node so that you can see how many people were sent to. Then try sending a test message to multiple categories and see how many people were sent to. I know I do that sort of thing all the time on a test site when testing changes to the code before I submit them. You can also use the Mail Logger and/or Reroute Email modules to monitor what goes where in order to figure out what is happening.

Andy Inman’s picture

Surely the solution then, is to build an in-memory or cached list of email addresses, the remove duplicates before sending? (similar issue with Notify module I think.)

coreyp_1’s picture

Here's my stab at it. I'm basically using MySQL to do the filtering, since that's what's its designed for, anyway.

This patch is against the latest dev. It makes sure that a user id is only pulled once from MySQL, regardless of how many roles they are included in.

-Corey

Stewplayer’s picture

So is there a solution yet? I see alot of buzz and comments on my initial post, but I had to start using a third-party email application, as this feature was an embarrassment for me. The client did not like the multiple emails. Ultimately I would like the mass contact to work PROPERLY and be integrated with the rest of the features of Drupal...

Problue Solutions’s picture

unfortunately I have also had to stop using it for the same reason, looks very unprofessional and even had a few complaints from users about the duplicates.

Just as a matter of interest, in my case its nothing to do with roles or categories, sending a single message to a single category containing a single role still results in users receiving duplicate emails (I'm not talking about admin), so i doubt the above patch will help in my case.

Problue Solutions’s picture

any chance this has been fixed? I've had to start using phpList instead, but it would be much better to do my mailouts from within drupal if the duplicate emails problem was solved.

Chad_Dupuis’s picture

Mostly subscribing... but does anyone know if this happens in the 5.x version as well?

esend7881’s picture

I notice this patch (http://drupal.org/node/359930#comment-1370374) was written back in March, but wasn't committed to any Dev branch.

Does this patch resolve the problem? Any reason it hasn't been committed yet?

Also, just curious when this module will emerge out of beta.

dorien’s picture

Some thing here. It started when I created batches

Wolfgang Reszel’s picture

Any news on this?

Wolfgang Reszel’s picture

Component: Miscellaneous » Code
FileSize
16.24 KB

Hi,

I created a simple patch which first collects all recipients instead of sending mails to every group. I don't know if it works for all case.

The patch works with the Dev from 2010-May-12.

Tekl

oadaeh’s picture

Category: bug » feature
Status: Active » Closed (fixed)

I have implemented this feature in the 7.x version of this module. It is enabled by selecting to not include a category in the subject line. Otherwise, the behavior is the same.

Will I back port it to 6.x? I don't know. I've got a lot going on right now.

oadaeh’s picture

Status: Closed (fixed) » Fixed

Oops. Wrong status.

Status: Fixed » Closed (fixed)

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