Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __construct() {
- parent::__construct();
- $this->load->model('example');
- }
- class Contact extends CI_Controller {
- public function __construct(){
- parent::__construct();
- $this->load->model('contact_model', 'contact');
- }
- public function index(){
- $data['contact'] = $this->contact->getContact();
- $this->load->view('contact', $data);
- }
- public function send_mail(){
- /* Mail configuration - ONLY USED HERE */
- $config = array('protocol' => 'mail',
- 'wordwrap' => FALSE,
- 'mailtype' => 'html',
- 'charset' => 'utf-8',
- 'crlf' => "rn",
- 'newline' => "rn",
- 'send_multipart' => FALSE
- );
- $this->load->library('email', $config);
- $records = $this->contact->getCompany();
- $this->email->from( $setmail, $records['CompanyName'] );
- $this->email->to( $to );
- $this->email->subject( $subject );
- $this->email->message( $html );
- $this->email->send();
- }
- }
Add Comment
Please, Sign In to add comment