Welcome Guest, Not a member yet? Register   Sign In
send html format
#4

[eluser]Jay Logan[/eluser]
For HTML e-mails, I do something like this:

Code:
$this->load->library('email');
$email_config['protocol'] = 'smtp';
$email_config['smtp_host'] = 'SERVER';
$email_config['smtp_user'] = 'USER';
$email_config['smtp_pass'] = 'PASS';
$email_config['smtp_port'] = '26';
$this->email->initialize($email_config);
            
$this->email->from('EMAIL ADDRESS', 'Web Administrator');
$this->email->to('RECIPIENT');
            
$this->email->subject('EMAIL SUBJECT');
    
            
$this->email->message($this->load->view('mail/free_estimate', array(
'name_first' => $this->input->post('name_first'),
'name_last' => $this->input->post('name_last'),
'addr_home_street' => $this->input->post('addr_home_street'),
'addr_home_city' => $this->input->post('addr_home_city'),
'addr_home_state' => $this->input->post('addr_home_state'),
'addr_home_zip' => $this->input->post('addr_home_zip'),
'phone_home' => $this->input->post('phone_home'),
'email_home' => $this->input->post('email_home')
), TRUE));
$this->email->send();

Then just make a view file containing the message HTML and use code like <?= $name_first ?> to display info.


Messages In This Thread
send html format - by El Forum - 07-21-2009, 09:13 PM
send html format - by El Forum - 07-21-2009, 11:38 PM
send html format - by El Forum - 07-22-2009, 09:35 AM
send html format - by El Forum - 07-22-2009, 09:57 AM
send html format - by El Forum - 07-22-2009, 08:02 PM
send html format - by El Forum - 07-22-2009, 08:37 PM
send html format - by El Forum - 07-22-2009, 09:01 PM
send html format - by El Forum - 07-22-2009, 09:35 PM
send html format - by El Forum - 07-22-2009, 09:37 PM
send html format - by El Forum - 07-22-2009, 09:53 PM
send html format - by El Forum - 10-02-2009, 07:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB