Welcome Guest, Not a member yet? Register   Sign In
Sending Codeigniter Views As HTML Content Using PHPMailer
#2

[eluser]Aken[/eluser]
Code:
$content = file_get_contents($this->load->view('mail/contact_us', '' , TRUE));

// Wrong, should be:

$content = $this->load->view('mail/contact_us', '' , TRUE);

You're essentially passing the string data from a view as the first parameter of file_get_contents(), which is wrong. Using the TRUE third parameter of $this->load->view() will return the contents as a string, which is all you need.


Messages In This Thread
Sending Codeigniter Views As HTML Content Using PHPMailer - by El Forum - 08-12-2012, 10:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB