Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function fastorder() {
- $this->load->language('common/footer');
- $name = $_POST['name'];
- $phone = $_POST['phone'];
- $message = $_POST['message'];
- $email_subject = $this->language->get('email_subject_fast_order');
- $email_body = sprintf($this->language->get('email_body_fast_order'),$name,$phone,$message);
- $mail = new Mail();
- $mail->protocol = $this->config->get('config_mail_protocol');
- $mail->parameter = $this->config->get('config_mail_parameter');
- $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
- $mail->smtp_username = $this->config->get('config_mail_smtp_username');
- $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
- $mail->smtp_port = $this->config->get('config_mail_smtp_port');
- $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
- $mail->setTo($this->config->get('config_email'));
- $mail->setFrom($this->config->get('config_email'));
- $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
- $mail->setSubject(html_entity_decode($email_subject, ENT_QUOTES, 'UTF-8'));
- $mail->setHtml($this->document->createMail($email_body));
- //echo $this->document->createMail($email_body);die;
- $mail->send();
- $json = array("success" => true);
- $this->response->addHeader('Content-Type: application/json');
- $this->response->setOutput(json_encode($json));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement