Reopening as this is generating an error. I commented in PULL-574 and said:
Something is wrong. Im getting the following error when a user is sent an email notification of a personal message.
Error: lib/moodlelib.php email_to_user(): User is null or has no email.
The user receiving the message has an email address in their user profile but hasnt specified an email address in their messaging preferences. If there is no email address specified in the messaging preferences it should fall back to using the one in the user's user profile.
Sorry Rossie, we've done something wrong