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

[eluser]Unknown[/eluser]
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:

config/email.php
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
Code:
$this->load->library('email', $config);
$this->email->from('[email protected]', 'me');
$this->email->to($this->input->get_post('email'));
$this->email->subject('sss');
$this->email->message('<h4>hi</h4><br /><br /><p>bye</p>');
$this->email->send();


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!


Messages In This Thread
Can't get HTML to work in e-mails - by El Forum - 08-09-2011, 03:10 AM
Can't get HTML to work in e-mails - by El Forum - 08-09-2011, 04:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB