1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

class Zend_Mail
{
  function __call()
  {
    $args = func_get_args();
    $name = array_shift($args);
    // truncate 'send' from $name
    // set up $this->view
    // call $this->$_properlyFormattedName($args)
    // render "application/modules/$this->_module/views/mails/$properly-formatted-name.text.phtml"
    // render "application/modules/$this->_module/views/mails/$properly-formatted-name.html.phtml"
    // send
  }
}

class My_Mail_User extends Zend_Mail
{
  protected $_module = 'admin';

  private function _resetPassword($user)
  {
     $this->view->user = $user;
     $this->setSubject('...');
  }
}

$mail = new My_Mail_User;
$mail->sendResetPassword($joe);