Mail::getError PHP Method

getError() public method

The different mail sending methods write errors to the error property $this->error, this method simply returns this error / error array.
public getError ( ) : mixed
return mixed
    public function getError()
    {
        return $this->error;
    }

Usage Example

Example #1
0
 /**
  * @function 
  * @public
  * @static
  * @returns NONE
  * @desc
  * @param {string} foo Use the 'foo' param for bar.
  * @example NONE
  */
 public static function sendVerificationEmail($user_id, $user_email, $user_activation_hash)
 {
     return true;
     $body = Config::get('EMAIL_VERIFICATION_CONTENT') . Config::get('URL') . Config::get('EMAIL_VERIFICATION_URL') . '/' . urlencode($user_id) . '/' . urlencode($user_activation_hash);
     $mail = new Mail();
     $mail_sent = $mail->sendMail($user_email, Config::get('EMAIL_VERIFICATION_FROM_EMAIL'), Config::get('EMAIL_VERIFICATION_FROM_NAME'), Config::get('EMAIL_VERIFICATION_SUBJECT'), $body);
     if ($mail_sent) {
         Session::add('feedback_positive', Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL'));
         return true;
     } else {
         Session::add('feedback_negative', Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_ERROR') . $mail->getError());
         return false;
     }
 }
All Usage Examples Of Mail::getError