Search code examples
drupaldrupal-6

How do I disable the confirmation email sent out from Drupal?


I am using Drupal 6.19. I don't want users to receive confirmation email on registration.

For this I unchecked "Require e-mail verification when a visitor creates an account" in Admin > User management > user settings.

But now what happens is that the verification email has been changed to confirmation email. i.e no verification link is there but the still the mail is sent out from the website with the user credentials. I do not need the mail at all. Could anyone suggest a solution for this problem?


Solution

  • Sounds like you'll need to write a custom module that has hook_form_alter and looks for submission of the registration form. You could hack away at the user module but then any updates will overwrite your changes.

    Looks like user_Registration_submit makes a couple of conditional calls to _user_mail_notify which you probably want to catch and stop.

    http://api.drupal.org/api/drupal/modules--user--user.module/function/user_register_submit/6

    Initially I'd comment out those lines and register to confirm that they are responsible for the mail. If they are then you can try and see what you can do to step in and stop that call...

    Hope that helps