Advertisement
Guest User

Untitled

a guest
Feb 18th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.58 KB | None | 0 0
  1.     public function fastorder() {
  2.  
  3.         $this->load->language('common/footer');
  4.  
  5.         $name = $_POST['name'];
  6.         $phone = $_POST['phone'];
  7.         $message = $_POST['message'];
  8.  
  9.  
  10.         $email_subject = $this->language->get('email_subject_fast_order');
  11.         $email_body = sprintf($this->language->get('email_body_fast_order'),$name,$phone,$message);
  12.  
  13.         $mail = new Mail();
  14.         $mail->protocol = $this->config->get('config_mail_protocol');
  15.         $mail->parameter = $this->config->get('config_mail_parameter');
  16.         $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
  17.         $mail->smtp_username = $this->config->get('config_mail_smtp_username');
  18.         $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
  19.         $mail->smtp_port = $this->config->get('config_mail_smtp_port');
  20.         $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
  21.  
  22.         $mail->setTo($this->config->get('config_email'));
  23.         $mail->setFrom($this->config->get('config_email'));
  24.         $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
  25.         $mail->setSubject(html_entity_decode($email_subject, ENT_QUOTES, 'UTF-8'));
  26.         $mail->setHtml($this->document->createMail($email_body));
  27. //echo $this->document->createMail($email_body);die;
  28.         $mail->send();
  29.  
  30.         $json = array("success" => true);
  31.         $this->response->addHeader('Content-Type: application/json');
  32.         $this->response->setOutput(json_encode($json));
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement