function send_payment_confirmation_email($data = array()) { $CI = get_instance(); $val = get_admin_email_and_name(); $admin_email = $val['admin_email']; $admin_name = $val['admin_name']; $CI->load->model('admin/system_model'); $tmpl = $CI->system_model->get_email_tmpl_by_email_name('payment_confirmation_email'); $subject = $tmpl->subject; $subject = str_replace("#username", $data['user_name'], $subject); $subject = str_replace("#resumelink", $data['link'], $subject); $subject = str_replace("#webadmin", $admin_name, $subject); $subject = str_replace("#useremail", $data['user_email'], $subject); $body = $tmpl->body; $body = str_replace("#username", $data['user_name'], $body); $body = str_replace("#resumelink", $data['link'], $body); $body = str_replace("#webadmin", $admin_name, $body); $body = str_replace("#useremail", $data['user_email'], $body); $CI->load->library('email'); $CI->email->from($admin_email, $subject); $CI->email->to($data['user_email']); $CI->email->subject($subject); $CI->email->message($body); $CI->email->send(); }
public function send_feature_payment_confirmation_email($data = array()) { $val = get_admin_email_and_name(); $admin_email = $val['admin_email']; $admin_name = $val['admin_name']; $link = site_url('account/login/'); $this->load->model('admin/system_model'); $tmpl = $this->system_model->get_email_tmpl_by_email_name('payment_confirmation_email'); $subject = $tmpl->subject; $subject = str_replace("#username", $data['user_name'], $subject); $subject = str_replace("#loginlink", $link, $subject); $subject = str_replace("#webadmin", $admin_name, $subject); $subject = str_replace("#useremail", $data['user_email'], $subject); $body = $tmpl->body; $body = str_replace("#username", $data['user_name'], $body); $body = str_replace("#loginlink", $link, $body); $body = str_replace("#webadmin", $admin_name, $body); $body = str_replace("#useremail", $data['user_email'], $body); $this->load->library('email'); $this->email->from($admin_email, $subject); $this->email->to($data['user_email']); $this->email->subject($subject); $this->email->message($body); $this->email->send(); }