public function getEmail() { $this->__load(); return parent::getEmail(); }
/** * Send a welcome email to a new user * * @param \Entities\Contact $contact The recipient of the email * @return bool True if the mail was sent successfully */ private function sendWelcomeEmail($contact) { try { $mail = $this->getMailer(); // This may be useful... needs more thought first // if( defined( APPLICATION_ENV ) && APPLICATION_ENV == 'production' ) // ->addCc( $this->getUser()->getEmail(), $this->getUser()->getContact()->getName() ); $mail->setFrom($this->_options['identity']['email'], $this->_options['identity']['name'])->setSubject($this->_options['identity']['sitename'] . ' - ' . _('Your Access Details'))->addTo($contact->getEmail(), $contact->getName())->setBodyHtml($this->view->render('user/email/html/welcome.phtml'))->send(); } catch (Zend_Mail_Exception $e) { $this->getLogger()->alert("Could not send welcome email for new user!\n\n" . $e->toString()); return false; } return true; }