Notification email not received after new user registration

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
publimedia01
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jul 07, 2011 3:16 pm

Notification email not received after new user registration

Postby publimedia01 » Fri Oct 28, 2011 7:04 pm

I have a problem: Super User is not receiving notification emails when a new user is registering.

My configuration is as follows:

- Joomla version: 1.7.0.
- Super User Profile > Receive System emails: Yes
- Users Manager Options (Users Configuration) > New User Account Activation: Self
- Global Configuration > Server > Mail Settings > Mailer: PHP Mail

1. When a new user is registered Super User is not notified by email, but the new user receives the activation email and the registration works properly. The only problem is that Super User is not aware of the fact that a new user has registered because he doesn’t receive any email.

2. If I change "New User Account Activation" from "self" to "Admin", when a new user is registering the Super User receives a notification email with the activation link of the new user.

3. When a user sends a contact form, the Super User receives the email properly.

I don't think that is a problem of mail settings because in point 2 and 3 the Super User is receiving emails from the webpage.

Can anybody help me to fix this problem?

Thank you for your attention.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 30875
Joined: Sat Apr 05, 2008 9:58 pm

Re: Notification email not received after new user registrat

Postby Webdongle » Fri Oct 28, 2011 7:25 pm

With 1.7 there are no system emails when 'New User Account Activation: Self'. The Admin only gets an email when 'New User Account Activation: Admin'. Then the admin can chose to Activate the account or not.
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html

publimedia01
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jul 07, 2011 3:16 pm

Re: Notification email not received after new user registrat

Postby publimedia01 » Fri Oct 28, 2011 8:22 pm

Thank your for your help, I didn't know that there are no system emails with 'New User Account Activation: Self' on joomla 1.7.0.
I think it could be a good idea for new releases of joomla to give the possibility to receive systems emails also with this user activation option !!
Regards,

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 30875
Joined: Sat Apr 05, 2008 9:58 pm

Re: Notification email not received after new user registrat

Postby Webdongle » Fri Oct 28, 2011 8:32 pm

'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html

User avatar
kennywickstrom
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu May 01, 2008 5:16 am
Contact:

Re: Notification email not received after new user registrat

Postby kennywickstrom » Thu Nov 10, 2011 10:49 pm

I have modified my J1.7.2 so that it will send the SuperAdmins with "Receive system emails" enabled when users activate their account.

Find the following code in components/com_users/models/registration.php (about line 155)

Code: Select all

        else
        {
            $user->set('activation', '');
            $user->set('block', '0');
and add the following into the "else".

Code: Select all

            // Send email to admins
            $uri = JURI::getInstance();
            jimport('joomla.user.helper');
            // Compile the admin notification mail values.
            $data = $user->getProperties();
            $data['activation'] = JUtility::getHash(JUserHelper::genRandomPassword());
            //$user->set('activation', $data['activation']);
            $data['siteurl']    = JUri::base();
            $base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
            $data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);
            $data['fromname'] = $config->get('fromname');
            $data['fromname'] = $config->get('fromname');
            $data['mailfrom'] = $config->get('mailfrom');
            $data['sitename'] = $config->get('sitename');
            //$user->setParam('activate', 1);
            $emailSubject   = JText::sprintf(
                'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT',
                $data['name'],
                $data['sitename']
            );

            $emailBody = JText::sprintf(
                'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY',
                $data['sitename'],
                $data['name'],
                $data['email'],
                $data['username'],
                $data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation']
            );

            // get all admin users
            $query = 'SELECT name, email, sendEmail' .
                        ' FROM #__users' .
                        ' WHERE sendEmail=1';

            $db->setQuery( $query );
            $rows = $db->loadObjectList();

            // Send mail to all superadministrators id
            foreach( $rows as $row )
            {
                $return = JUtility::sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody);

                // Check for an error.
                if ($return !== true) {
                    $this->setError(JText::_('COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));
                    return false;
                }
            }
to
The admins will receive the same email as if activation is set to "admin", you just don't need to actually do the activation.

The code that is inserted is borrowed from the "admin" section. If you want to be fancy, you can change the strings sent in the email.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 30875
Joined: Sat Apr 05, 2008 9:58 pm

Re: Notification email not received after new user registrat

Postby Webdongle » Thu Nov 10, 2011 11:12 pm

Could you create a diff patch for http://joomlacode.org/gf/project/joomla ... m_id=26206 see what everyone has to say ?
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html

pearlcaviar
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Sat Dec 04, 2010 6:57 pm

Re: Notification email not received after new user registrat

Postby pearlcaviar » Fri Nov 11, 2011 1:51 am

I totally agree with you. We should receive email notification 'cos new registrant could be a bad spammer. Hope the Joomla Developer team will look into it.

Regards,

publimedia01 wrote:Thank your for your help, I didn't know that there are no system emails with 'New User Account Activation: Self' on joomla 1.7.0.
I think it could be a good idea for new releases of joomla to give the possibility to receive systems emails also with this user activation option !!
Regards,

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 30875
Joined: Sat Apr 05, 2008 9:58 pm

Re: Notification email not received after new user registrat

Postby Webdongle » Fri Nov 11, 2011 2:48 am

pearlcaviar wrote:.... Hope the Joomla Developer team will look into it.
...

If kennywickstrom creates a diff patch then it can be put on http://joomlacode.org/gf/project/joomla ... m_id=26206 for testing. The Dev's could decide if they want to use it then.
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html

User avatar
kennywickstrom
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu May 01, 2008 5:16 am
Contact:

Re: Notification email not received after new user registrat

Postby kennywickstrom » Fri Nov 11, 2011 4:13 am

I have created a new item ( http://joomlacode.org/gf/project/joomla ... m_id=27144 ) since the issue mention previously is closed. I attached a patch to the new issue.

This patch does not really change the email message being sent since that required new language entries.

publimedia01
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jul 07, 2011 3:16 pm

Re: Notification email not received after new user registrat

Postby publimedia01 » Fri Nov 11, 2011 12:50 pm

Thank you 'kennywickstrom' for your solution code.

I really hope that joomla developpers team will make this function available in new releases.
There are plenty of ideas around the forum for a better joomla release.

I have personally been working to find some solutions to one of the joomla problems concerning the articles loaded on a Category List and the SEF urls utilization. When you are reading an article which is located on a Category List of a website that is using SEF urls, an you decide to login, you will be returned to a blank page (or an error page if you have installed JCE editor), and not to the article you was reading. I have treated this problem and encourage developpers to find a solution for future releases. For more information read: http://forum.joomla.org/viewtopic.php?f=616&t=672782

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 30875
Joined: Sat Apr 05, 2008 9:58 pm

Re: Notification email not received after new user registrat

Postby Webdongle » Fri Nov 11, 2011 7:08 pm

kennywickstrom wrote:I have created a new item ( http://joomlacode.org/gf/project/joomla ... m_id=27144 ) since the issue mention previously is closed. I attached a patch to the new issue.
....

The other Tracker is still open, but I've set your Tracker as 'Pending' with a note on the original Tracker to the one you created. (It's too complicated an issue for me to test as I don't understand if using the code like that is the best way to achieve it. So will wait to see what the Dev's say).

Thanks for your effort, lets hope they approve.
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html


Return to “General Questions/New to Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 5 guests