html email help

I wrote a simple controller script to try to get my html emails working. I can't figure it out though. The view is a form that has an email and body form inputs. I'm submitting complete, really simple, html pages. Heres my controller

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Email_tester extends CI_Controller {

public function __construct()

function index()
  $this->form_validation->set_rules('email', 'email', 'xss_clean|trim|required|valid_email');
  $this->form_validation->set_rules('body', 'body', 'trim|required');
  $this->form_validation->set_error_delimiters('', '<br/><br/>');

  if($this->form_validation->run() == TRUE)
   $email      = $this->input->post('email');
   $email_body = $this->input->post('body');

   $email_config['mailtype'] = 'html';

   $this->email->from('[email protected]', 'Test');
   $this->email->subject("Email Test");
   $session['message'] = "Email Sent.<br/><br/>";
   $data['title'] = "";
   $data['login'] = "";
   $this->load->view('header_view', $data);
   $this->load->view('Test/email_tester', $data);



And i just tried sending this through the textarea in my form...

Quote:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta>
&lt;style type="text/css"&gt;
background: #888;
margin: 0 auto;
width: 600px;
background: #fff;
padding: 30px;
text-align: center;
<div id='content'>
<p>Testing<br/>Please work</p>

I'm sending it to my gmail email account. I see that a text and an html version are being sent but gmail isn't displaying it as html, it's all text. What am i doing wrong?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.