Sorry, it's actually class_dm_pm, but you probably figured that out...
Anyway, there's this code around line 589 (in version 4.1.9):
Code:
if (($user['options'] & $this->registry->bf_misc_useroptions['emailonpm']) AND $user['usergroupid'] != 3 AND $user['usergroupid'] != 4)
{
$touserinfo =& $user;
$plaintext_parser->set_parsing_language($touserinfo['languageid']);
$plaintext_message = $plaintext_parser->parse($this->fetch_field('message'), 'privatemessage');
eval(fetch_email_phrases($email_phrases['pmreceived'], $touserinfo['languageid'], '', 'email'));
vbmail($touserinfo['email'], $emailsubject, $emailmessage, false, 'no_reply@foo.com');
}
That sends the "you have a pm" email. I added the part in red (the 'false' is another default parameter that comes before the from address).