Overall, this is working perfectly. The e-mail is sent using the correct template, it is sent to the right person, it is sent from the default name and e-mail address for the board.
It is the latter I would like to change.
So... I have:
$options = XenForo_Application::get('options'); $fromEmail = $options->fromEmail; $mail = new XenForo_Mail('my_email_template', $params, $visitor['language_id']); $mail->send($toEmail, $toName, $headers = array(), $fromEmail);
This could well be a bug - if it is feel free to move it to Bug Reports - though probably more likely is I've missed something