Welcome Guest, Not a member yet? Register   Sign In
Email script error
#1

[eluser]HooJee[/eluser]
Hi Guys

I am trying to send an email but I keep getting error. See code followed by error message:

// CODE
Code:
$this->load->library('email');
// get POST variables
$name = $this->input->post('name');
$email = $this->input->post('email');
$comments = $this->input->post('comments');

// send email
$this->email->from($email, $name); // THIS IS LINE 52
$this->email->to($ADMIN_EMAIL);
$this->email->subject('Message sent from Shad.com');
$this->email->message($comments);
$this->email->send();
echo $this->email->print_debugger();
echo "email sent";

Quote:A PHP Error was encountered

Severity: Notice
Message: Undefined property: Home::$email
Filename: controllers/home.php
Line Number: 52

Fatal error</b>: Call to a member function from() on a non-object in C:\wamp\www\personal\system\application\controllers\home.php on line 52
#2

[eluser]HooJee[/eluser]
anyone ?
#3

[eluser]Dam1an[/eluser]
Try enabling error logging to see if an error occurs when trying to load the email library




Theme © iAndrew 2016 - Forum software by © MyBB