Hi Was really happy to find this module and overjoyed to see that there were no issues!
But alas it doesn't seem to work at all for me. I have it installed and can see the checkboxes at admin/config/people/accounts
but unchecking the boxes has no effect. The system still send out those emails no matter if the box is checked or unchecked.
I am running Drupal 7.22.
Let me know if there is any other info you want from me to try to track down the issue. Cheers.

Comments

reszli’s picture

first of all, sorry for the delay, I was on vacation.
the module is working for me, and seems to work for at least 417 people according to usage stats :)
let me know if you figured out in the meantime, or if you still have issues
also, are you trying it on a clean D7 install, or you have an existing website with a bunch of contributed modules
for ex. I'm wondering if you are using the Variable module, variable translation or other variable related modules?

jienckebd’s picture

Issue summary: View changes

Maybe I'm missing something, but I don't see anything in the module that actually disables the e-mails from going out. The settings form is altered and uses variables specified by the mail control module. Those variables are not recognized by the core User module.

I think you'd have to add something like the below to disable the e-mails:

/**
 * Implements hook_mail_alter().
 *
 * Disable outbound e-mails sent by user module based on mailcontrol settings
 */
function mailcontrol_mail_alter(&$message) {
	if ($message['module'] == 'user') {
		// $message['key'] will be something like:
		// register_no_approval_required
		if (!variable_get('user_mail_' . $message['key'], 1)) {
			$message['send'] = FALSE;
		}
	}
}
reszli’s picture

Status: Active » Closed (cannot reproduce)

Hello jienckebd,

you should not worry about this old issue, 1,270 sites currently report to use it successfully right now
this issue was probably a misunderstanding and no further feedback was given by muddie, thus it is considered outdated

the module works just fine, as it creates variables that are considered dynamically by Drupal core before sending the emails
no need to add any additional code in it!

jereoms’s picture

This module is not working for me either. Using drupal 7.28.

I've actually tried adding the code to the template file:

if(variable_get('user_mail_register_no_approval_required_notify') == 1){
    variable_set('user_mail_register_no_approval_required_notify', 0);
}

Yet this didn't work either. Not sure if drupal has changed the capabilities for this module now.

*** EDIT

Never mind, I found the answer to my issue.

There was a setting under the ubercart checkout process that said
"Send new customers a separate e-mail with their account details."

For those with similar issues, found under the Anonymous tab at admin/store/settings/checkout.

This was checked so no matter what I did elsewhere, this setting overrode my modifications.

___James___’s picture

Hi.

Had the same issue (seemed like this module did nothing.) Logging out of the site and then back it again did the trick for me.

Thank you for the neat module!