Postingan lainnya
kirim email mengunakan codeigniter
stat = "SUCCESS";
$result = array($response);
$date_create_token = date('Y-m-d H:i:s');
$tokenstring = md5(time() . mt_rand(1,1000000)) . CRC32(time() . mt_rand(1,1000000).$date_create_token);
$links = site_url("v1/user/reset/token/".$tokenstring);
$email_user =$params['email_user'];
$this->load->library('email');
$config = array();
$config['charset'] = 'utf-8';
$config['useragent'] = 'Codeigniter';
$config['protocol']= "smtp";
$config['mailtype']= "html";
$config['smtp_host']= "ssl://smtp.gmail.com";//pengaturan smtp
$config['smtp_port']= "465";
$config['smtp_timeout']= "400";
$config['smtp_user']= "test@gmail.com"; // isi dengan email kamu
$config['smtp_pass']= "test"; // isi dengan password kamu
$config['crlf']="\r\n";
$config['newline']="\r\n";
$config['wordwrap'] = TRUE;
$this->email->initialize($config);
//konfigurasi pengiriman
$this->email->from($config['smtp_user']);
$this->email->to($email_user);
$this->email->subject("Konfirmasi E-Mail Anda");
$this->email->message("Token ini berlaku untuk 2 jam dari pengiriman token ini: Klik disini untuk reset password anda : <a href='$links' style='background-color: #ff5722; border-collapse: separate; border-top: 20px solid #ff5722; border-right: 20px solid #ff5722; border-bottom: 20px solid #ff5722; border-left: 20px solid #ff5722; border-radius: 3px; color: #FFFFFF; display: inline-block; font-family: Open Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .3px; text-decoration: none' target='_blank' rel='noreferrer'>Reset Password</a>");
itu kenapa engga terkirim emailnya ya?
0
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban