Guest User

Untitled

a guest
Jul 16th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. function emailSend($ship_item_data{
  2.  
  3. //$link = base_url();
  4. $email ="abc.develop01@gmail.com";
  5. $this->load->library('email');
  6. $config['mailtype'] = "html";
  7. $this->email->initialize($config);
  8. $this->email->from($email, 'GHL Sports');
  9. $this->email->to($email);
  10. $this->email->subject('Sold items detail');
  11. $msg='<html>
  12. <head>
  13. <title>Sold item</title>
  14. </head>
  15. <body>
  16. Dear GHL Sports Client.
  17. <p>This items heas been sold.</p><ul>';
  18.  
  19. foreach($ship_item_data as $data){
  20.  
  21. $item = $data['image_name'];
  22. $this->email->attach("sold/".$item);
  23. $msg .= '<li>'. $item .'</li>';
  24.  
  25. }
  26.  
  27. $msg .='</u>
  28. Please do reply to this email as it will not be monitored.
  29. </body>
  30. </html>';
  31.  
  32. $this->email->message($msg);
  33. //$link = base_url();
  34. //$this->email->attach("sold/1.jpg");
  35. //Send mail
  36. if($this->email->send()) {
  37. echo "email send successfully";
  38. }else{
  39. echo "email not send";
  40. }
  41.  
  42. $this->load->helper('path');
  43. $this->load->library('email');
Add Comment
Please, Sign In to add comment