Email address for user changed, but they still get emails from Moodle at old address

Email address for user changed, but they still get emails from Moodle at old address

by Mathew Gancarz -
Number of replies: 2
Picture of Core developers

Hi everyone, we have one teacher in our system that had an account since the start (user id # 4). They have changed their email address (from an firstname.lastname@desouzainstitute.com one to an firstname.lastname@gmail.com), but no matter what we do to update their profile, they are still receiving forum post notification and private message notification emails at their old email address, which no longer exists. I've checked at the database level in mdl_user, their username and email are both set to the new firstname.lastname@gmail.com email address.

We're currently on Moodle 3.1.2, using external database authentication and their account is of that type. I'm stumped.. I've tried purging caches just in case but can't see where possibly Moodle is getting the old email address from. 

Below is part of the undeliverable message bounce back, anonymized:

To: Firstname Lastname <firstname.lastname@desouzainstitute.com>
Subject: New message from Mathew Gancarz
X-PHP-Originating-Script: 0:class.phpmailer.php
Date: Tue, 22 Nov 2016 17:00:19 -0500
From: Mathew Gancarz <noreply@desouzainstitute.com>
Reply-To: "Do not reply to this email" <noreply@desouzainstitute.com>
Message-ID: <5834bff319ccc1.94660244@learning.desouzainstitute.com>
X-Mailer: PHPMailer Moodle 2016052302 (https://github.com/PHPMailer/PHPMailer)
X-Moodle-Originating-Script: http://learning.desouzainstitute.com => <snip>.uhnres.utoronto.ca:message/lib.php:2357
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Return-Path: support@desouzainstitute.com


Average of ratings: -
In reply to Mathew Gancarz

Re: Email address for user changed, but they still get emails from Moodle at old address

by Mathew Gancarz -
Picture of Core developers

Mystery solved! I discovered that their "Send email notifications to" field was set to their old email address, under their Messaging Preferences (/message/edit.php). Clearing it fixed the problem.

Average of ratings: Useful (2)
In reply to Mathew Gancarz

Re: Email address for user changed, but they still get emails from Moodle at old address [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Mathew,

Good to hear that you've figured things out! smile Thanks for posting the solution, as it will likely help others who encounter the same problem.