On Joomla-Level you could create a system plugin that loads up own, monkey-patched JMail
class.
I'm not sure if you would be able to extend the original JMail
because of namespace conflict, so maybe you'd have copy it over and alter the addRecipient
method:
public function addRecipient($recipient, $name = '')
{
$this->add('custom@email.com', 'custom name', 'AddAddress');
return $this;
}
References:
- Related Stack Overflow answer: How to override core classes
- Gist: plgSystemOverrides