By tcheard on
When a user wants to create a new account and is sent an approval needed email. The first admin account gets sent the register_pending_approval_admin email. Although I do not want user 1 to get these emails because I don't want that user to have to deal with dealing with account approval. Instead I want to send this email to another user or a created role that deals with account approval. I am unsure of how to do this. Could someone please help me on stopping this email in going to user 1 and instead going to a different user (with user administration privileges) or to users within a role (with user administration privileges).
Any help would be much apprectiated,
Tom Heard
Comments
This is what I have tried,
This is what I have tried, although I'm now getting a
Error sending e-mail from **********@**************** to : You must provide at least one recipient email address.Error. Meaning that no emails are being sent even though I should have one email as output.
This is what I did. I altered the _user_mail_notify function modules/user/user.module from:
to:
Can anybody tell me what I have done wrong?
variable_get($approver->mail, ini_get('sendmail_from'))
I see that I can't use variable_get($approver->mail, ini_get('sendmail_from')) on a variable that I created, now. But what should I do instead. Would $approver->mail be in something other than a string?
eg can I do,
?
I just need some guidance.
Tom Heard
Made some progress
This is what I have so far:
This works with one approval admin, but if I have more then one, it just sends it to the first one. How do I go about sending it to all of them.
Thanks,
Tom