otp mail
This commit is contained in:
parent
ee124cbd61
commit
c8441e5a09
@ -329,7 +329,7 @@ class Login_model extends CI_Model
|
||||
|
||||
{
|
||||
$result['loginstudent'] = true;
|
||||
$this->db->select('LO.MobileNumber, LO.ListCode, LO.ID,ST.BranchCode, ST.LoginAccess,ST.EmailID');
|
||||
$this->db->select('LO.MobileNumber, LO.ListCode, LO.ID,ST.BranchCode, ST.LoginAccess,ST.EmailID,ST.Firstname');
|
||||
$this->db->from('' . LOGIN . ' as LO');
|
||||
$this->db->join('' . STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
|
||||
$this->db->where('LO.MobileNumber', $mobile);
|
||||
@ -339,7 +339,7 @@ class Login_model extends CI_Model
|
||||
if($responseDetails->LoginAccess ==1){
|
||||
|
||||
$EmailID = $responseDetails->EmailID;
|
||||
|
||||
$name = $responseDetails->Firstname;
|
||||
|
||||
$string2 = str_shuffle('1234567890');
|
||||
$otp = substr($string2,0,6);
|
||||
@ -356,7 +356,7 @@ class Login_model extends CI_Model
|
||||
if($query == 1){
|
||||
$sms = $this->smssend($mobile,$otp);
|
||||
|
||||
$mail = $this->mailsend($EmailID,$otp);
|
||||
$mail = $this->mailsend($EmailID,$otp,$name);
|
||||
|
||||
$result['checkstudent'] = true;
|
||||
}else{
|
||||
@ -453,9 +453,7 @@ class Login_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function mailsend($EmailID,$otp) {
|
||||
public function mailsend($EmailID,$otp,$name) {
|
||||
$emails = array();
|
||||
|
||||
$list = $EmailID;
|
||||
@ -477,7 +475,7 @@ class Login_model extends CI_Model
|
||||
// print_r($this->email);exit();
|
||||
//Email content
|
||||
// $htmlContent = '<h1>Sending email via SMTP server</h1>';
|
||||
$htmlContent = 'Your OTP for login ApolloDEC is '.$otp;
|
||||
$htmlContent = 'Dear '.$name.', Your OTP for login ApolloDEC is '.$otp;
|
||||
// $htmlContent = $msg;
|
||||
// Email body load the html template
|
||||
// $body = $this->load->view('emails/anillabs.php',$data,TRUE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user