*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* @return void
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Get a user instance from registry
- $userInstance = Registry::getRegistry()->getInstance('user');
+ // Get template instance
+ $templateInstance = $responseInstance->getTemplateInstance();
// Get a mailer class
- $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class');
+ $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance));
// Load the mail template
$mailerInstance->loadTemplate('resend_link');
+ // Get a user instance from registry
+ $userInstance = Registry::getRegistry()->getInstance('user');
+
// Add the recipient
- $mailerInstance->addRecipientByUser($userInstance);
+ $mailerInstance->addRecipientByUserInstance($userInstance);
// Set subject line from template
$mailerInstance->setSubjectFromTemplate();