Advertisement
Guest User

Untitled

a guest
Jan 9th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. $mail = new Mail();
  2.  
  3. $namess = $this->request->post['name'];
  4. $emailss = $this->request->post['email'];
  5. $phoness = $this->request->post['phone'];
  6. $phoness2 = $this->request->post['phone2'];
  7. $enquiryss = $this->request->post['enquiry'];
  8. $conve = $this->request->post['contactviae'];
  9. $convp = $this->request->post['contactviap'];
  10. if($conve == '1')
  11. {
  12. $convee = "Yes";
  13. }
  14. else
  15. {
  16. $convee = "No";
  17. }
  18. if($convp == '1')
  19. {
  20. $convpp = "Yes";
  21. }
  22. else
  23. {
  24. $convpp = "No";
  25. }
  26.  
  27. $body = "Hello Admin <br/><br/> You have recieved a request for product. The details for your product is as follow :
  28. <br/><br/>
  29. <table border='1'>
  30. <tr><td>Name</td><td>$namess</td></tr>
  31. <tr><td>Email</td><td>$emailss</td></tr>
  32. <tr><td>Phone No</td><td>$phoness</td></tr>
  33. <tr><td>Secondary Phone</td><td>$phoness2</td></tr>
  34. <tr><td>Enquiry</td><td>$enquiryss</td></tr>
  35. <tr><td>Contact Via Email</td><td>$convee</td></tr>
  36. <tr><td>Contact Via Phone</td><td>$convpp</td></tr>
  37. </table><br/><br/>
  38. Thanks & Regards
  39. ";
  40.  
  41. $mail->protocol = $this->config->get('config_mail_protocol');
  42. $mail->parameter = $this->config->get('config_mail_parameter');
  43. $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
  44. $mail->smtp_username = $this->config->get('config_mail_smtp_username');
  45. $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
  46. $mail->smtp_port = $this->config->get('config_mail_smtp_port');
  47. $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
  48.  
  49. $mail->setTo($this->config->get('config_email'));
  50. $mail->setFrom($this->request->post['email']);
  51. $mail->setSender(html_entity_decode($this->request->post['name'], ENT_QUOTES, 'UTF-8'));
  52. $mail->setSubject("Request a product");
  53. $mail->setHtml($body);
  54.  
  55. //$mail->setText(html_entity_decode($body, ENT_QUOTES, 'UTF-8'));
  56.  
  57. $mail->send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement