admin/controllers/Email.php
public function resend()
    {
        if (!userHasPermission('admin:email:email:resend')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oEmailer = Factory::service('Emailer', 'nails/module-email');

        // --------------------------------------------------------------------------

        $oUri     = Factory::service('Uri');
        $iEmailId = $oUri->segment(5);
        $sReturn  = $this->input->get('return') ? $this->input->get('return') : 'admin/email/index';

        if ($oEmailer->resend($iEmailId)) {
            $sStatus  = 'success';
            $sMessage = 'Message was resent successfully.';
        } else {
            $sStatus  = 'error';
            $sMessage = 'Message failed to resend. ' . $oEmailer->lastError();
        }

        $oSession = Factory::service('Session', 'nails/module-auth');
        $oSession->setFlashData($sStatus, $sMessage);
        redirect($sReturn);
    }
public function resend()
    {
        if (!userHasPermission('admin:email:email:resend')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oEmailer = Factory::service('Emailer', 'nails/module-email');

        // --------------------------------------------------------------------------

        $oUri     = Factory::service('Uri');
        $iEmailId = $oUri->segment(5);
        $sReturn  = $this->input->get('return') ? $this->input->get('return') : 'admin/email/index';

        if ($oEmailer->resend($iEmailId)) {
            $sStatus  = 'success';
            $sMessage = 'Message was resent successfully.';
        } else {
            $sStatus  = 'error';
            $sMessage = 'Message failed to resend. ' . $oEmailer->lastError();
        }

        $oSession = Factory::service('Session', 'nails/module-auth');
        $oSession->setFlashData($sStatus, $sMessage);
        redirect($sReturn);
    }
public function resend ( ) { if ( ! userHasPermission ( 'admin:email:email:resend' ) ) { unauthorised ( ) ; } // -------------------------------------------------------------------------- $ oEmailer = Factory :: service ( 'Emailer' , 'nails/module-email' ) ; // -------------------------------------------------------------------------- $ oUri = Factory :: service ( 'Uri' ) ; $ iEmailId = $ oUri -> segment ( 5 ) ; $ sReturn = $ this -> input -> get ( 'return' ) ? $ this -> input -> get ( 'return' ) : 'admin/email/index' ; if ( $ oEmailer -> resend ( $ iEmailId ) ) { $ sStatus = 'success' ; $ sMessage = 'Message was resent successfully.' ; } else { $ sStatus = 'error' ; $ sMessage = 'Message failed to resend. ' . $ oEmailer -> lastError ( ) ; } $ oSession = Factory :: service ( 'Session' , 'nails/module-auth' ) ; $ oSession -> setFlashData ( $ sStatus , $ sMessage ) ; redirect ( $ sReturn ) ; }
Resent an email
@return void
Resent an email