src/Service/Emailer.php
public function getByRef($sRef, $aData = [])
    {
        if (empty($aData['where'])) {
            $aData['where'] = [];
        }

        $aData['where'][] = [$this->sTableAlias . '.ref', $sRef];

        $aEmails = $this->getAll(null, null, $aData);

        return !empty($aEmails) ? reset($aEmails) : false;
    }
public function getByRef($sRef, $aData = [])
    {
        if (empty($aData['where'])) {
            $aData['where'] = [];
        }

        $aData['where'][] = [$this->sTableAlias . '.ref', $sRef];

        $aEmails = $this->getAll(null, null, $aData);

        return !empty($aEmails) ? reset($aEmails) : false;
    }
public function getByRef ( $ sRef , $ aData = [ ] ) { if ( empty ( $ aData [ 'where' ] ) ) { $ aData [ 'where' ] = [ ] ; } $ aData [ 'where' ] [ ] = [ $ this -> sTableAlias . '.ref' , $ sRef ] ; $ aEmails = $ this -> getAll ( null , null , $ aData ) ; return ! empty ( $ aEmails ) ? reset ( $ aEmails ) : false ; }
Get an email from the archive by its reference

@param string $sRef  The email's reference
@param array  $aData The data array

@return mixed        stdClass on success, false on failure
@throws \Nails\Common\Exception\FactoryException
Get an email from the archive by its reference