Allow the administrator to customize the email recipient, subject, and body of the user registration notification email.

Patch attached.

Comments

walterhoct’s picture

Title: Allow customization of email message » Patch message

When I applied this patch, I got the following.

(Stripping trailing CRs from patch.)
patching file user_register_notify.module
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 66 with fuzz 1.

Any idea?

salvis’s picture

Title: Patch message » Allow customization of email message
Status: Needs review » Needs work

The patch applied just fine on 5.x-1.x-dev.

#1: Please do not change the title!

OP: I really like your patch, but it has a few minor problems:

  1. the preferred style for 5.x menu entries is to capitalize the first letter of the first word only
  2. the preferred format for 5.x menu item titles is a full sentence starting with a verb
  3. bad indentation of the line starting $variables =
  4. the !uri and !uri_brief variables don't work
  5. the !mailto variable isn't mentioned
  6. also, I would suggest to add:
       $headers = array('Reply-To' => $account->mail);
    

    and append $headers to the drupal_mail() argument list (and update the user_mail() call, too).
    We never want to reply to the site_mail address, but we might want to send e-mail to the new user.

davemybes’s picture

StatusFileSize
new2.08 KB

I was going to create a new issue, but seeing as its almost the same request, I thought I'd post here instead.

I like the idea of customizing the actual email as well, but usually its the site admin dealing with the notifications, so it doesn't have to be fancy. However, having the ability to change the recipient of the notification would be quite useful.

I have created my own patch to do this (attached). I have just looked at the patch supplied above, and I see that essentially the same technique is used, except that I could never get the nested variable_get statements (that get the email addresses) to work, so I used an if...else statement instead (Drupal 5.5, MySQL & PHP 5).

rmiddle’s picture

Status: Needs work » Needs review

user_notify_customization.patch - Wont Fix. Something for the 2.x branch
user_register_notify-email.patch - Was one of 2 features I was looking to add.

rmiddle’s picture

Status: Needs review » Fixed

Patch #3 is commited to CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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