Allow for custom user registration approval email address

Created on 17 June 2009, over 15 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

Currently all system mail is sent from the address configured on the 'admin/config/system/site-information' page. It is not possible at the moment to choose another address for sending the welcome/activation/block/cancel e-mails.

Proposed resolution

  • Attached patch in #9 creates a new configuration field on the 'admin/config/people/accounts' page on top of the e-mail templates form.
  • It also changes the drupal_mail() function a bit, to check if this field is used and uses the value if available if sending a 'notification'.

Remaining tasks

User interface changes

  • 1 new field on 'admin/config/people/accounts'.

API changes

  • 1 new variable and a small change to drupal_mail().

Original report by mcrittenden

Currently, when a new user registers and registration requires admin approval, an email is sent to the site email for notification. Here's the line (line 2633 of user.module in current HEAD)

drupal_mail('user', 'register_pending_approval_admin', variable_get('site_mail', ini_get('sendmail_from')), language_default(), $params);

This email address needs to be customizable. In many cases, the admin that needs this email isn't the same as the email used for the site. A good site email is often something like no-reply@example.com or support@example.com while the person who needs to receive the email is often something like msmith@example.com. Also, it's fairly common for clients to want multiple recipients of this email, which is currently impossible since the 'site_mail' variable only allows for one address. The User settings page (admin/user/settings) would be a perfect place for this.

Also, this is an often point of confusion since the description of "Site Email Address" includes nothing about that email actually being sent TO; it only mentions being used as a from address. Here's that description:

The From address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)

I think just a Notification Email Address text input on the User Settings is all that's needed here.

Feature request
Status

Fixed

Version

8.0 ⚰️

Component
User module 

Last updated about 8 hours ago

Created by

🇺🇸United States mcrittenden

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024