Welcome Guest, Not a member yet? Register   Sign In
html eamil problem
#1

[eluser]moin cse[/eluser]
Hi all,
I want to send formated html email. But I have faced some problems. My email configuration is as follows-
Code:
$config['mailtype'] = 'html';
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset']  = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['validate'] = TRUE;
$config['charset'] = 'utf-8';
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";

if i want to load a view page like-
Code:
$msg = $this->load->view('admin/email_view', $data, TRUE);
$this->email->message($msg);
then all the html codes are sending throgh email.
again if want to load the email contents from database like-
Code:
$message = $this->email_model->get_email_template_details('account_confirmation');    
$msg = str_replace($patterns, $replacements, $message['content']);
$this->email->message($msg);
then how can i send the html formated email.
Please give me a direction.
Thanks in advance.
Regards
#2

[eluser]sophistry[/eluser]
welcome to CI!

a few things:

you don't need wordwrap = TRUE because that is the default.

take out one of your charsets, you have two.

try different combinations of crlf and newline to debug.

triple-check your HTML to make sure your tags are all opened and closed properly.
#3

[eluser]moin cse[/eluser]
@sophistry: Thanks
I have solved it and it was our autoload problem
#4

[eluser]sophistry[/eluser]
great! but, could you be more specific so in case someone else has the same problem they can benefit...

what does "autoload problem" mean?

thanks.




Theme © iAndrew 2016 - Forum software by © MyBB