[eluser]dudeami0[/eluser]
When trying to create a html email, I get a blank message in Thunderbird. I tested it with plain text and it works fine. I'm using a local Mercury installation.
Anyways, this is my code:
Code:
$html = $this->load->view('email', '', true);
$config = array();
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['useragent'] = 'Gfxtub.com';
$this->load->library('email');
$this->email->initialize($config);
$this->email->to("kris@localhost");
$this->email->from("admin@localhost");
$this->email->subject("Hello World (No attach)");
$this->email->message($html);
$this->email->send();
echo $this->email->print_debugger();
And this is the output of the debugger
Code:
Your message has been successfully sent using the following protocol: mail
User-Agent: CodeIgniter
Date: Tue, 9 Nov 2010 21:04:24 -0500
From:
Return-Path:
Reply-To: "admin@localhost"
X-Sender: admin@localhost
X-Mailer: Gfxtub.com
X-Priority: 3 (Normal)
Message-ID: <4cd9fda874c57@localhost>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4cd9fda874c62"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_4cd9fda874c62
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
This is a test!
--B_ALT_4cd9fda874c62
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=?utf-8?Q?Hello_World_(No_attach)?=
<html>
<head>
<title>Gfxtub.com</title>
</head>
<body>
<b>This is a test!</b>
</body>
</html>
--B_ALT_4cd9fda874c62--
I noticed that the output of the HTML does not have a new line after the headers (Which I think I remember being a bit important, maybe not though). Any help would be much appreciated