Welcome Guest, Not a member yet? Register   Sign In
Can't get HTML to work in e-mails

Hello everyone, this is my first post on these forums, excuse me if i picked the section wrongly.

Anyway, here's the case. I've been trying to send an e-mail with some basic HTML content, such as headers, new lines etc. Tried a dozen examples, setting and even though some were literally copied from blog posts proven to be working, I seemed to have no luck whatsoever. Here's my current code:

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

$config['protocol'] = 'sendmail';
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;

from controllers/mailer.php
$this->load->library('email', $config);
$this->email->from('[email protected]', 'me');
$this->email->message('<h4>hi</h4><br /><br /><p>bye</p>');

I would assume it's that the library is not using the config provided at all... I want it to use default PHP mail settings, btw.

Any help is greatly appreciated!

Oh God, I feel so stupid. The config file was in config/config/email.php hence the error. All solved and working flawlessly, close the thread at will =)

Theme © iAndrew 2016 - Forum software by © MyBB