CodeIgniter Forums
Email Message Help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Email Message Help (/thread-29585.html)



Email Message Help - El Forum - 04-14-2010

[eluser]codedoode[/eluser]
Code:
<?php

class Site extends Controller
{
    function index()
    {
        $this->load->view('options_view');
    }
    
    function create()
    {
        
        $data = array(
            'name' => $this->input->post('name'),
            'address' => $this->input->post('address'),
            'city' => $this->input->post('city'),
            'state' => $this->input->post('state'),
            'zip' => $this->input->post('zip'),
            'phone' => $this->input->post('phone'),
            'cell' => $this->input->post('cell'),
            'email' => $this->input->post('email'),
            'property' => $this->input->post('property'),
            'comments' => $this->input->post('comments'),
            
        );
        
        $this->load->library('email');

        $this->email->from('[email protected]', 'TESTING');
        $this->email->to('[email protected]');


        $this->email->subject('Email Test');
        $this->email->message('{unwrap}You have received a new registration, the details are below. This information is also being saved in a database for your convenience. Please do not reply to this e-mail.{/unwrap}');    

        $this->email->send();
        
        $this->site_model->add_record($data);
        $this->index();
    }
}

Where the message code is I'm trying to display that message I currently have, plus an HTML table that will display information that the user just currently submitted by using the form. I'm lost on how to do this. Please help


Email Message Help - El Forum - 04-14-2010

[eluser]Bart v B[/eluser]
What i am missing is, where is youre config how to send the email?
In other words does anything send a mail?

try this:

Code:
echo $this->email->print_debugger();


And take a look here:
The email class

Hope it help you Wink