Email received in a code style not a message type - Codeigniter |
-
ronald_balza
Newbie
-
Posts: 7
Threads: 5
Joined: Sep 2020
Reputation:
0
I am receiving in my gmail account the code instead of a regular type of message in email. How can I receive the email without the code. Thanks in advance
Controller
Code: <?php
class account_login_model extends CI_Model
{
public function __construct()
{
parent::__construct();
$this->load->database();
}
public function login($username, $password)
{
$condition_array = array(
'acc_username' => $username,
'acc_password' => $password
);
$rs = $this->db->get_where('accounts', $condition_array);
return $rs->row_array() ?: false;
}
public function isBlocked($username)
{
$condition_array = array(
'acc_username' => $username,
'acc_isBlocked' => 1
);
$rs = $this->db->get_where('accounts', $condition_array);
$row_count = count($condition_array);
if ($row_count > 0) {
return true;
} else {
return FALSE;
}
}
public function block($username)
{
$this->load->library('email');
$email = $this->account_lookup($username, 'acc_email');
$this->email->from('[email protected]', 'Student');
$this->email->to($email);
$this->email->subject('Account has been blocked');
$message = $this->load->view('account_blocked', null, TRUE);
$this->email->message($message);
$this->email->send();
$this->db->where('acc_username', $username);
return $this->db->update('accounts', array('acc_isBlocked' => 1));
}
}
|
Messages In This Thread |
Email received in a code style not a message type - Codeigniter - by ronald_balza - 09-25-2020, 02:12 AM
|